diff --git a/M_CAN Driver Usage Device Tree.md b/M_CAN Driver Usage Device Tree.md index 7009cfb..4dcbefe 100644 --- a/M_CAN Driver Usage Device Tree.md +++ b/M_CAN Driver Usage Device Tree.md @@ -48,11 +48,30 @@ clk = {20 MHz, 40 MHz, 80 MHz} It is important, due to internal clock crossings, that *hclk* is always higher or equal to *cclk*. -## MRAM Config +### MRAM Config The last device tree value configures the setup and layout of the MRAM (message RAM). It is an array consisting of eight values: ``` -bosch,mram-cfg = =v3.1.x)> -``` \ No newline at end of file +bosch,mram-cfg = =v3.1.x)>; +``` + +The *offset* value defines the address offset in bytes inside the MRAM region. Ensure that the memory regions of different M_CANs with the same MRAM do not overlap each other. + +The remaining values configure the amout of elments for different FIFOs and Buffers. + +#### M_CAN version 3.0.x + +For M_CAN versions 3.0.x, the driver only uses the RX FIFO 0 and 1(!) TX Buffer. Therefore +It is an array consisting of eight values: +``` +bosch,mram-cfg = <0x0, 0, 0, 32, 0, 0, 0, 1>; +``` +is a valid configuration with 32 RX FIFO elements. The other values cna be set to numbers greater than zero according to the user manual. The space will be reserved in the message RAM will not be used by the driver. + +Also it is possible to configure more than 1 TX Buffer. However, only one will be used. + +#### M_CAN version >3.1.x + +For versions greater than 3.1.x the \ No newline at end of file