This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2632-Q1: Adding QSPI to working project causes the project to ABORT in the QSPI initiailzation code

Part Number: AM2632-Q1
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

I have just migrated our project from MCU SDK 9 to MCU SDK 10.01.00.31 and Syscfg 1.22.  The project built and ran as expected.  I have ran the project on the Control card.  I add the QSPI device to the syscfg for the project.  

The application runs until is gets to the QSPI_open(), this function is in qspi.c of the SDK.  The function never returns.  A pause in the debugger shows that it is in the ABORT handler.

NOTE: If I remove the QSPI device from syscfg things work correctly.  We are not using the QSPI device in our application just trying to add it so that we can do work.

  • I have a zip file of the project ready to share.  The insert file does not appear to let me attach the file.  It is a small file ~100KB.

  • Hi Jeffrey,

    I have assigned this query to out SW / Sysconfig expert. 

    We are not using the QSPI device in our application just trying to add it so that we can do work.

    Can you please help me understand this statement and  your usecase.

    Can you please help us with the below information: 

    1. Which API in the QSPI_open() did the fail occur?
    2. What type of abort is it ? Prefetch / data
    3. Screenshots of the Sysconfig configurations , MPU region configurations 


    Regards,
    Rijohn



  • Rijohn,

    This is the flow into the QSPI driver

    ti/mcu_plus_sdk_am263x_10_01_00_31/source/drivers/qspi/v0/qspi.c
    - QSPI_open()

    ti/mcu_plus_sdk_am263x_10_01_00_31/source/drivers/qspi/v0/qspi_lld.c
    - QSPI_lld_initDma()
    - QSPI_programInstance() line 913.

    The ABORT is handled:

    ABORT:
    ti/mcu_plus_sdk_am263x_10_01_00_31/source/kernel/freertos/dpl/r5/HwIP_armv7r_handlers_freertos_asm.c

    I am not certain how to determine the type of abort.  Can you provide some guidance.

    This is memory region information from Syscfg


    region1.$name = "MEMORY_REGION_CONFIGURATION0";
    region1.memory_region.create(11);
    region1.memory_region[0].type = "TCMA";
    region1.memory_region[0].$name = "R5F_VECS";
    region1.memory_region[0].size = 0x40;
    region1.memory_region[0].auto = false;
    region1.memory_region[1].type = "TCMA";
    region1.memory_region[1].$name = "R5F_TCMA";
    region1.memory_region[1].size = 0x7FC0;
    region1.memory_region[2].type = "TCMB";
    region1.memory_region[2].size = 0x8000;
    region1.memory_region[2].$name = "R5F_TCMB";
    region1.memory_region[3].$name = "SBL";
    region1.memory_region[3].auto = false;
    region1.memory_region[3].size = 0x40000;
    region1.memory_region[4].$name = "OCRAM";
    region1.memory_region[4].auto = false;
    region1.memory_region[4].manualStartAddress = 0x70040000;
    region1.memory_region[4].size = 0x1B8000;
    region1.memory_region[5].type = "FLASH";
    region1.memory_region[5].auto = false;
    region1.memory_region[5].size = 0x80000;
    region1.memory_region[5].$name = "FLASH";
    region1.memory_region[6].$name = "USER_SHM_MEM";
    region1.memory_region[6].auto = false;
    region1.memory_region[6].size = 0x4000;
    region1.memory_region[6].isShared = true;
    region1.memory_region[6].shared_cores = ["r5fss0-1","r5fss1-0","r5fss1-1"];
    region1.memory_region[6].manualStartAddress = 0x701F8000;
    region1.memory_region[7].$name = "LOG_SHM_MEM";
    region1.memory_region[7].auto = false;
    region1.memory_region[7].size = 0x4000;
    region1.memory_region[7].isShared = true;
    region1.memory_region[7].shared_cores = ["r5fss0-1","r5fss1-0","r5fss1-1"];
    region1.memory_region[7].manualStartAddress = 0x701FC000;
    region1.memory_region[8].type = "CUSTOM";
    region1.memory_region[8].$name = "RTOS_NORTOS_IPC_SHM_MEM";
    region1.memory_region[8].auto = false;
    region1.memory_region[8].manualStartAddress = 0x72000000;
    region1.memory_region[8].size = 0x3E80;
    region1.memory_region[8].isShared = true;
    region1.memory_region[8].shared_cores = ["r5fss0-1","r5fss1-0","r5fss1-1"];
    region1.memory_region[9].type = "CUSTOM";
    region1.memory_region[9].$name = "MAILBOX_HSM";
    region1.memory_region[9].auto = false;
    region1.memory_region[9].manualStartAddress = 0x44000000;
    region1.memory_region[9].size = 0x3CE;
    region1.memory_region[9].isShared = true;
    region1.memory_region[9].shared_cores = ["r5fss0-1","r5fss1-0","r5fss1-1"];
    region1.memory_region[10].type = "CUSTOM";
    region1.memory_region[10].$name = "MAILBOX_R5F";
    region1.memory_region[10].auto = false;
    region1.memory_region[10].manualStartAddress = 0x44000400;
    region1.memory_region[10].size = 0x3CE;
    region1.memory_region[10].isShared = true;
    region1.memory_region[10].shared_cores = ["r5fss0-1","r5fss1-0","r5fss1-1"];

    section1.load_memory = "R5F_VECS";
    section1.group = false;
    section1.$name = "Vector Table";
    section1.output_section.create(1);
    section1.output_section[0].$name = ".vectors";
    section1.output_section[0].palignment = true;

    section2.load_memory = "OCRAM";
    section2.$name = "Text Segments";
    section2.output_section.create(5);
    section2.output_section[0].$name = ".text.hwi";
    section2.output_section[0].palignment = true;
    section2.output_section[1].$name = ".text.cache";
    section2.output_section[1].palignment = true;
    section2.output_section[2].$name = ".text.mpu";
    section2.output_section[2].palignment = true;
    section2.output_section[3].$name = ".text.boot";
    section2.output_section[3].palignment = true;
    section2.output_section[4].$name = ".text:abort";
    section2.output_section[4].palignment = true;

    section3.load_memory = "OCRAM";
    section3.$name = "Code and Read-Only Data";
    section3.output_section.create(2);
    section3.output_section[0].$name = ".text";
    section3.output_section[0].palignment = true;
    section3.output_section[1].$name = ".rodata";
    section3.output_section[1].palignment = true;

    section4.load_memory = "OCRAM";
    section4.$name = "Data Segment";
    section4.output_section.create(1);
    section4.output_section[0].$name = ".data";
    section4.output_section[0].palignment = true;

    section5.load_memory = "OCRAM";
    section5.$name = "Memory Segments";
    section5.output_section.create(3);
    section5.output_section[0].$name = ".bss";
    section5.output_section[0].output_sections_start = "__BSS_START";
    section5.output_section[0].output_sections_end = "__BSS_END";
    section5.output_section[0].palignment = true;
    section5.output_section[1].$name = ".sysmem";
    section5.output_section[1].palignment = true;
    section5.output_section[2].$name = ".stack";
    section5.output_section[2].palignment = true;

    section6.load_memory = "OCRAM";
    section6.$name = "Stack Segments";
    section6.output_section.create(5);
    section6.output_section[0].$name = ".irqstack";
    section6.output_section[0].output_sections_start = "__IRQ_STACK_START";
    section6.output_section[0].output_sections_end = "__IRQ_STACK_END";
    section6.output_section[0].input_section.create(1);
    section6.output_section[0].input_section[0].$name = ". = . + __IRQ_STACK_SIZE;";
    section6.output_section[1].$name = ".fiqstack";
    section6.output_section[1].output_sections_start = "__FIQ_STACK_START";
    section6.output_section[1].output_sections_end = "__FIQ_STACK_END";
    section6.output_section[1].input_section.create(1);
    section6.output_section[1].input_section[0].$name = ". = . + __FIQ_STACK_SIZE;";
    section6.output_section[2].$name = ".svcstack";
    section6.output_section[2].output_sections_start = "__SVC_STACK_START";
    section6.output_section[2].output_sections_end = "__SVC_STACK_END";
    section6.output_section[2].input_section.create(1);
    section6.output_section[2].input_section[0].$name = ". = . + __SVC_STACK_SIZE;";
    section6.output_section[3].$name = ".abortstack";
    section6.output_section[3].output_sections_start = "__ABORT_STACK_START";
    section6.output_section[3].output_sections_end = "__ABORT_STACK_END";
    section6.output_section[3].input_section.create(1);
    section6.output_section[3].input_section[0].$name = ". = . + __ABORT_STACK_SIZE;";
    section6.output_section[4].$name = ".undefinedstack";
    section6.output_section[4].output_sections_start = "__UNDEFINED_STACK_START";
    section6.output_section[4].output_sections_end = "__UNDEFINED_STACK_END";
    section6.output_section[4].input_section.create(1);
    section6.output_section[4].input_section[0].$name = ". = . + __UNDEFINED_STACK_SIZE;";

    section7.load_memory = "OCRAM";
    section7.$name = "Initialization and Exception Handling";
    section7.output_section.create(3);
    section7.output_section[0].$name = ".ARM.exidx";
    section7.output_section[0].palignment = true;
    section7.output_section[1].$name = ".init_array";
    section7.output_section[1].palignment = true;
    section7.output_section[2].$name = ".fini_array";
    section7.output_section[2].palignment = true;

    section8.load_memory = "USER_SHM_MEM";
    section8.type = "NOLOAD";
    section8.$name = "User Shared Memory";
    section8.group = false;
    section8.output_section.create(1);
    section8.output_section[0].$name = ".bss.user_shared_mem";
    section8.output_section[0].alignment = 0;

    section9.load_memory = "LOG_SHM_MEM";
    section9.$name = "Log Shared Memory";
    section9.group = false;
    section9.type = "NOLOAD";
    section9.output_section.create(1);
    section9.output_section[0].$name = ".bss.log_shared_mem";
    section9.output_section[0].alignment = 0;

    section10.load_memory = "RTOS_NORTOS_IPC_SHM_MEM";
    section10.type = "NOLOAD";
    section10.$name = "IPC Shared Memory";
    section10.group = false;
    section10.output_section.create(1);
    section10.output_section[0].$name = ".bss.ipc_vring_mem";
    section10.output_section[0].alignment = 0;

    section11.load_memory = "MAILBOX_HSM";
    section11.type = "NOLOAD";
    section11.$name = "SIPC HSM Queue Memory";
    section11.group = false;
    section11.output_section.create(1);
    section11.output_section[0].$name = ".bss.sipc_hsm_queue_mem";
    section11.output_section[0].alignment = 0;

    section12.load_memory = "MAILBOX_R5F";
    section12.$name = "SIPC R5F Queue Memory";
    section12.group = false;
    section12.type = "NOLOAD";
    section12.output_section.create(1);
    section12.output_section[0].$name = ".bss.sipc_r5f_queue_mem";
    section12.output_section[0].alignment = 0;

    section13.load_memory = "R5F_VECS";
    section13.group = false;
    section13.$name = "Vector Table_COPY";
    section13.output_section.create(1);
    section13.output_section[0].$name = ".vectors_COPY";
    section13.output_section[0].palignment = true;

    section14.load_memory = "R5F_VECS";
    section14.group = false;
    section14.$name = "Vector Table_COPY1";
    section14.output_section.create(1);
    section14.output_section[0].$name = ".vectors_COPY1";
    section14.output_section[0].palignment = true;


    mpu_armv71.$name = "CONFIG_MPU_REGION0";
    mpu_armv71.size = 31;
    mpu_armv71.attributes = "Device";
    mpu_armv71.accessPermissions = "Supervisor RD+WR, User RD";
    mpu_armv71.allowExecute = false;

    mpu_armv72.$name = "CONFIG_MPU_REGION1";
    mpu_armv72.size = 15;
    mpu_armv72.accessPermissions = "Supervisor RD+WR, User RD";

    mpu_armv73.$name = "CONFIG_MPU_REGION2";
    mpu_armv73.baseAddr = 0x80000;
    mpu_armv73.size = 15;
    mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";

    mpu_armv74.$name = "CONFIG_MPU_REGION3";
    mpu_armv74.accessPermissions = "Supervisor RD+WR, User RD";
    mpu_armv74.baseAddr = 0x70000000;
    mpu_armv74.size = 21;

    mpu_armv75.$name = "CONFIG_MPU_REGION4";
    mpu_armv75.size = 14;
    mpu_armv75.baseAddr = 0x50D00000;
    mpu_armv75.allowExecute = false;
    mpu_armv75.attributes = "Device";

    mpu_armv76.$name = "CONFIG_MPU_REGION5";
    mpu_armv76.size = 14;
    mpu_armv76.allowExecute = false;
    mpu_armv76.attributes = "NonCached";
    mpu_armv76.baseAddr = 0x72000000;

    mpu_armv77.$name = "CONFIG_MPU_REGION6";

  • Hi,
    you can check the call stack/debug window  in CCS, it will look like the attached image. See if its DATA abort or something else.

  • Thank you  I will add that information.

    Additional information.  I consulted the basic hello world FreeRtos  sample.  I used its memory region configuration as a reference for our application.  I removed the extra regions.  I also modified a couple of regions to match what the hello world config.  The only region I had to change from HelloWorld was OCRAM.  I had to increase it from the 256KB to 1.5MB.  Our application is currently ~600KB.  The changes allowed the application to work as expected.  

    My assumption is that we had some invalid memory region settings.