Update page 'M_CAN Driver Usage Device Tree'

Mario Hüttel 2017-04-26 14:06:21 +02:00
parent 8bbc219d3d
commit a8f55df8f4

@ -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*. 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). The last device tree value configures the setup and layout of the MRAM (message RAM).
It is an array consisting of eight values: It is an array consisting of eight values:
``` ```
bosch,mram-cfg = <offset, 11bit filter, 29 bit filter, RX FIFO 0, RX FIFO 1, RX Buffers, TX event FIFO, TX Buffers (v3.0.x) / TX FIFO Elements (>=v3.1.x)> bosch,mram-cfg = <offset, 11bit filter, 29 bit filter, RX FIFO 0, RX FIFO 1, RX Buffers, TX event FIFO, TX Buffers (v3.0.x) / TX FIFO Elements (>=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