DMA issues on S32K324

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DMA issues on S32K324

Jump to solution
439 Views
ilx123
Contributor II

Hi,

I am trying to use DMA together with eMIOS ICU. eMIOS is configured in SAIC mode to capture a PWM signal and transfer this captured value via DMA to a specified circular buffer. DMA does not transfer anything to the specified buffer, and no DMA completion notification or ICU timestamp notification is never entered (DMA completion notification should call ICU timestamp notification). I set breakpoints and it is never entered and the buffer stays empty.

I have an S32K344 development board as well and have tested the same code and configuration on that one. This one works as expected: buffer gets filled, DMA interrupt (completion notification) is happening, which then calls the ICU timestamp notification.

I have also noticed something very strange with S32K324: I am not able to start a debugging session with Ozone (using Segger J-Link). I get the following output: 

 

Unknown SDA AP Id detected: 0xFFFFFFFF
InitTarget() end - Took 7.26ms
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 39us
InitTarget() start
Unknown SDA AP Id detected: 0xFFFFFFFF
InitTarget() end - Took 7.79ms
Connect failed. Resetting via Reset pin and trying again.
ConfigTargetSettings() start
ConfigTargetSettings() end - Took 14us
InitTarget() start
Unknown SDA AP Id detected: 0xFFFFFFFF
InitTarget() end - Took 7.99ms
Connection failed.

 

With the S32K344 I am able to successfully debug with Ozone. With other debugger (PE Micro Universal), I get issues as well. S32K344 works absolutely fine while S32K324 experiences crashes and is not able to start a session sometimes. Doing step by step does not work, the session gets terminated.

Also, my S32K344 is in lockstep mode while my S32K324 project is separated into C0 and C1 projects.

Why am I experiencing differences in how DMA runs on different processors? How do I fix this on S32K324 to make DMA work? Are there any differences/limitations of the S32K324 compared to S32K344? Could it be that some parts (memory, registers) are inaccessible to the S32K324 because it is not lockstepped like the S32K344?

 

0 Kudos
Reply
1 Solution
391 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @ilx123,

On the S32K324 platform, the secondary core can be halted by the debugger.
Could you please check the eDMA_SCR[EDBG] bit and clear it if it is set?

You could also let the secondary core run and test the DMA again.

danielmartynek_0-1760015317739.png

 

Regards,

Daniel

 

View solution in original post

3 Replies
392 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @ilx123,

On the S32K324 platform, the secondary core can be halted by the debugger.
Could you please check the eDMA_SCR[EDBG] bit and clear it if it is set?

You could also let the secondary core run and test the DMA again.

danielmartynek_0-1760015317739.png

 

Regards,

Daniel

 

275 Views
ilx123
Contributor II

Hi @danielmartynek , this resolves the issue, thank you! However, I encounter a new issue that the interrupt triggers only on full buffer an not on half full buffer (when I configure it to interrupt on both). Also when manually clearing the TCD INT for the corresponding channel it does not want to clear it with the command: IP_TCD->CH1_INT = DMA_IP_TCD_CH_INT_INT_MASK;

Both of this works on the K344. What causes such issue?

 

0 Kudos
Reply
271 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @ilx123,

Please create a new thread to keep it clear.

 

Thank you,

BR, Daniel

0 Kudos
Reply