Hello everybody!
I need a bit of help for including DMA in my model.
I have a CAN transmission system. I want to include a DMA, and I found the blocks in the library. I have a couple a questions about how to configure the parameters of the eDMA send block.
I am not quite sure what to put in the Source and Destination List.
Since I receive several messages over CAN 1 and send them over CAN 2, how can I know which memory address specify in here? I tried looking for the peripherals in the "Destination List Register Select" tab. But they never appeared here.
Any clue where to begin with this?
Kind regards,
Juliana.
Hello @juliana_rojas30 ,
Can you type a 'ver' command in the Matlab environment and send me the output related with Model-Based Design Toolbox? DO you have a MBD Config block in the model? Can you send me your model?
Hope this helps,
Marius
Sure @mariuslucianand , here it is.
And attached is the model.
The model I am currently working on is just a simple test for making the DMA work with CAN. So it's only the CAN configure blocks and the DMA blocks. I am trying to receive the signal over CAN 0 and sending them back over CAN 1. And that's why I am using those addresses in the block.
I have a question regarding the scatter/gather transfer block (In the model PruebaDMA_SG). I tried to implement it but it doesn't work..I'm not sure which register and offset to use (in the Source/Destination List Register). I put the ones I think correspond to the MB5, so that's why I have those valies in the source register.
Hello @juliana_rojas30 ,
I can't reproduce the opening block issue in my PC, but from your last message, I can see that you are running the S32K 4.1.0. Can you please update to our last S32K 4.2.0. Maybe this will solve the opening block issue.
Hope this helps,
Marius
Hi @mariuslucianand ,
The problem with the error is solved.. thanks! Now my issue is regarding which register/direction to use in order to fill the parameters in the eDMA send block.
I tried the directions from the S32K1xx_Memory_Map but they didn't work.
And since I am going to use perihperals, I tried filling the data requested in the Register List tab, but I am not sure what to put in the register and offset spaces.
I am receiving data over CAN0, I tried the RXIMR0 because I thought it would be for receiving on the MB0, but apparently it is not like this. Can you tell me what is wrong?
Thanks again!
Also, everytime I try to load and configure the DMA block, I get this error message:
Maybe this is where is the issue that doesn't let me find the peripheral to configure it. Any idea how to fix this?
P.D.: I don't know if it helps but this is how my devices folder looks like:
Thanks in advance.
Kind regards,
Juliana.