i.MX6SX Cortex-M4 SDMA M2M Transfer Problem

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX6SX Cortex-M4 SDMA M2M Transfer Problem

Jump to solution
482 Views
Contributor I

I have ported over the i.MX6UL FreeRTOS SDMA and sdma_memory_to_memory example application to the i.MX6SX platform for the Cortex-M4 core.  When I run the application I get some strange behavior dependent upon the "count" parameter of the SDMA BD.

Platform: i.MX6SX SABRE-SDB

Software: FreeRTOS_BSP_1.0.1_iMX6SX

Toolchain: GNU Tools for Arm Embedded Processors 7-2018-q3-update

Expected Behavior:

    * All bytes in the source buffer are correctly copied to the destination buffer via the SDMA

Actual Behavior:

    * For counts 1-7, the source is correctly copied to the destination buffer.

    * For count of 8 bytes, the first 4 bytes of the source are copied to the destination, then the next 4 bytes are copied to offset 12 (incorrectly skipping 8 bytes).

    * For a count of 12 bytes, the behavior of 8 bytes is observed, but then the source bytes at offsets 8-11 are correctly located at destination offsets 8-11.

    * For a count of 16 bytes, the behavior of 12 bytes is observed, but bytes at source offsets 8-15 are reproduced at destination offsets 16-23.  This means bytes at offsets 8-11 are duplicated.

Steps to Reproduce:

    1. Download the attached memory_to_memory.zip example

    2. Create the directory FreeRTOS_BSP_1.0.1_iMX6SX/examples/imx6sx_sdb_m4/driver_examples/sdma

    3. Extract the zip file to the location FreeRTOS_BSP_1.0.1_iMX6SX/examples/imx6sx_sdb_m4/driver_examples/sdma.  A directory containing source should be created at FreeRTOS_BSP_1.0.1_iMX6SX/examples/imx6sx_sdb_m4/driver_examples/sdma/memory_to_memory.

    4. Build with the script build_debug.sh in the FreeRTOS_BSP_1.0.1_iMX6SX/examples/imx6sx_sdb_m4/driver_examples/sdma/memory_to_memory/armgcc.

    5. Load and run the resulting binary within u-boot.

Notes:

    * All memory is within the TCM so as to eliminate external memory configuration concerns.

Is there some misconfiguration within my program that would cause the SDMA M2M (IMX6SXRM Appendix A ap_2_ap) script to perform this behavior?

Thanks,

Jake

2018-10-30: The requested file has been uploaded.  

Regards,

Jake

Labels (1)
1 Solution
100 Views
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!

View solution in original post

0 Kudos
7 Replies
101 Views
Community Manager
This an automatic process.

We are marking this post as solved, due to the either low activity or any reply marked as correct.

If you have additional questions, please create a new post and reference to this closed post.

NXP Community!

View solution in original post

0 Kudos
103 Views
NXP Employee
NXP Employee

Hi Jacob,

I think the problem is that the SDMA scripts are made from the Cortex-A perspective, the iMX6UL has only a Cortex-A9 core so that's why it has a SDMA M2M example. You would need to modify the SDMA scripts to make them work with the M4 core.

Unfortunately we cannot provide the SDMA scripts source code and/or modifications, this is out of the standard support that we provide. You can contact Professional Services to check if this is something that can be done.


Reference: https://www.nxp.com/support/support/nxp-professional-services:PROFESSIONAL-SERVICE
Contact: Prosupport@nxp.com

Thanks!

Vanessa

0 Kudos
103 Views
NXP Employee
NXP Employee

Hi joursland@jetheaddev.com‌,

Could you please send me the full project folder with your modifications (FreeRTOS_BSP_1.0.1_iMX6SX)?

I see some missing files trying to compile just by adding the "memory_to_memory" folder.

/home/vanessa/Documents/community/487273_sx_sdma_m2m/FreeRTOS_BSP_1.0.1_iMX6SX/platform/drivers/src/ccm_analog_imx6sx.c:31:31: fatal error: ccm_analog_imx6sx.h: No such file or directory
/home/vanessa/Documents/community/487273_sx_sdma_m2m/FreeRTOS_BSP_1.0.1_iMX6SX/platform/drivers/src/ccm_imx6sx.c:31:24: fatal error: ccm_imx6sx.h: No such file or directory
/home/vanessa/Documents/community/487273_sx_sdma_m2m/FreeRTOS_BSP_1.0.1_iMX6SX/platform/utilities/src/debug_console_imx.c:35:24: fatal error: device_imx.h: No such file or directory
/home/vanessa/Documents/community/487273_sx_sdma_m2m/FreeRTOS_BSP_1.0.1_iMX6SX/platform/drivers/src/lmem.c:31:18: fatal error: lmem.h: No such file or directory
/home/vanessa/Documents/community/487273_sx_sdma_m2m/FreeRTOS_BSP_1.0.1_iMX6SX/platform/drivers/src/ccm_analog_imx6sx.c:31:31: fatal error: ccm_analog_imx6sx.h: No such file or directory
/home/vanessa/Documents/community/487273_sx_sdma_m2m/FreeRTOS_BSP_1.0.1_iMX6SX/platform/drivers/src/ccm_imx6sx.c:31:24: fatal error: ccm_imx6sx.h: No such file or directory
/home/vanessa/Documents/community/487273_sx_sdma_m2m/FreeRTOS_BSP_1.0.1_iMX6SX/platform/utilities/src/debug_console_imx.c:35:24: fatal error: device_imx.h: No such file or directory

I could copy the files from the 6UL SDK but I just want to make sure I have the same setup as yours.

Thanks in advance!

Best Regards,
Vanessa

0 Kudos
103 Views
Contributor I

Hi Vanessa,

I have uploaded the complete project folder as FreeRTOS_BSP_1.0.1_iMX6SX_SDMA.tgz.

Regards,

Jake

103 Views
NXP Employee
NXP Employee

Hi Jacob,

I received your package and I can see the issue on my board.

I started investigating this and I'll probably have an answer by next week (will be out of office tomorrow).

Thanks!

Vanessa

0 Kudos
103 Views
NXP Apps Support
NXP Apps Support

vanessamaegima‌, can you help with this thread?

103 Views
NXP Employee
NXP Employee

Sure Karina, I will investigate this.

0 Kudos