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.

LP-AM263: Add Mutliple CS pins to SPI Driver

Part Number: LP-AM263
Other Parts Discussed in Thread: SYSCONFIG

Hello,

I am working with Syscfg v1.18 with LP-AM263 SDK, and for setting up the SPI configs in my .syscfg, I am unsure how to add multiple CS pins to a single SPI bus. Under the SPI driver syscfg setup, in MCSPI Channel Configuration/Signals, I am able to to set a single CS Pin, but cannot find a way to add another CS pin for a second slave device.

Is there a way to add multiple CS pins through the syscfg tool?

  • Hi all,

    can someone provide an update on how to configure multiple chip selects for a single SPI port with sysconfig?

    We need an answer as soon as possible.

    Thanks!

    --Gunter

  • Hello Yue Hue,

    Please follow the following steps for selecting multiple channels:

    - Select Mode of Operation to Multi Channel Controller

    - Go to McSPI channel Configuration and click add button to add channels and select from drop down.

    I hope above step will help you. Let me know in case you have any queries.

    Regards,
    Akash Soni.

    -  

  • Hi! Thanks switching to multichannel controller did allow me to set another CS pin. I am running into a quick follow up issue though: in our system we are using pin K2 as the second slave. So for SPI4, we are using:

    B14 - Clock

    C12 - D0 (MOSI)

    D11 - D1 (MISO)

    A14 - CS0

    K2 - CS1

    However, it does not let me select K2 for CS1, saying "This selection is not possible with your other pin/peripheral overrides". However, K12 I have not assigned to any peripherals or as a GPIO, and on the pinout on the right hand side, the pin K2 is marked as "dark gray" or "Pin Available"

    Can you please help he see why I am unable to select K2 as CS1?

    For sanity, I also started a brand new syscfg project just for testing, and set it up so the only thing configured was SPI4 (and no other pins/peripherals). In this empty project, K2 is also not able to be selected

  • Hi! I am able to select K2 pin as a CS1. Could please check your syscfg once again or else you can share example.syscfg file. I have attached the screen for your reference.

    .

  • For some reason, I am unable to attach the syscfg to this, as insert -> file does not allow me to upload it. But I created an empty syscfg with my SDK, and only enabled SPI4. I am still unable to set CS1 to K4. As it is small, I will just copy the text to this message instead

    Would you also mind sharing me your syscfg file? 

    Syscfg (copy pasted)

    /**
    * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
    * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
    * @cliArgs --device "AM263x_beta" --package "ZCZ" --part "AM263x" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM263x@09.01.00"
    * @versions {"tool":"1.18.0+3266"}
    */

    /**
    * Import the modules used in this configuration.
    */
    const mcspi = scripting.addModule("/drivers/mcspi/mcspi", {}, false);
    const mcspi1 = mcspi.addInstance();
    const clock = scripting.addModule("/kernel/dpl/clock");
    const debug_log = scripting.addModule("/kernel/dpl/debug_log");
    const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
    const mpu_armv71 = mpu_armv7.addInstance();

    /**
    * Write custom configuration values to the imported modules.
    */
    mcspi1.$name = "CONFIG_MCSPI0";
    mcspi1.mode = "MULTI_CONTROLLER";
    mcspi1.SPI.$assign = "SPI4";
    mcspi1.SPI.CLK.$assign = "EQEP0_A";
    mcspi1.SPI.D0.$assign = "EQEP0_STROBE";
    mcspi1.SPI.D1.$assign = "EQEP0_INDEX";
    mcspi1.child.$name = "drivers_mcspi_v1_mcspi_v1_template0";
    mcspi1.mcspiChannel.create(2);
    mcspi1.mcspiChannel[0].$name = "CONFIG_MCSPI_CH0";
    mcspi1.mcspiChannel[0].CSn.$assign = "EQEP0_B";
    mcspi1.mcspiChannel[1].$name = "CONFIG_MCSPI_CH1";

    const edma = scripting.addModule("/drivers/edma/edma", {}, false);
    const edma1 = edma.addInstance({}, false);
    edma1.$name = "CONFIG_EDMA0";
    mcspi1.edmaDriver = edma1;
    edma1.edmaRmDmaCh[0].$name = "CONFIG_EDMA_RM0";
    edma1.edmaRmQdmaCh[0].$name = "CONFIG_EDMA_RM1";
    edma1.edmaRmTcc[0].$name = "CONFIG_EDMA_RM2";
    edma1.edmaRmParam[0].$name = "CONFIG_EDMA_RM3";

    mpu_armv71.$name = "CONFIG_MPU_REGION0";

    /**
    * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
    * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
    * re-solve from scratch.
    */
    mcspi1.mcspiChannel[1].CSn.$suggestSolution = "<error>";

  • Hi Yue Hu,

    Please find the example.syscfg content for your reference for am263x-lp.


    /**
    * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
    * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
    * @cliArgs --device "AM263x_beta" --package "ZCZ" --part "AM263x" --context "r5fss0-0" --product "MCU_PLUS_SDK@07.03.01"
    * @versions {"tool":"1.20.0+3587"}
    */

    /**
    * Import the modules used in this configuration.
    */
    const mcspi = scripting.addModule("/drivers/mcspi/mcspi", {}, false);
    const mcspi1 = mcspi.addInstance();
    const debug_log = scripting.addModule("/kernel/dpl/debug_log");
    const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
    const mpu_armv71 = mpu_armv7.addInstance();
    const mpu_armv72 = mpu_armv7.addInstance();
    const mpu_armv73 = mpu_armv7.addInstance();
    const mpu_armv74 = mpu_armv7.addInstance();
    const mpu_armv75 = mpu_armv7.addInstance();
    const mpu_armv76 = mpu_armv7.addInstance();
    const default_linker = scripting.addModule("/memory_configurator/default_linker", {}, false);
    const default_linker1 = default_linker.addInstance();
    const general = scripting.addModule("/memory_configurator/general", {}, false);
    const general1 = general.addInstance();
    const region = scripting.addModule("/memory_configurator/region", {}, false);
    const region1 = region.addInstance();
    const section = scripting.addModule("/memory_configurator/section", {}, false);
    const section1 = section.addInstance();
    const section2 = section.addInstance();
    const section3 = section.addInstance();
    const section4 = section.addInstance();
    const section5 = section.addInstance();
    const section6 = section.addInstance();
    const section7 = section.addInstance();
    const section8 = section.addInstance();
    const section9 = section.addInstance();
    const section10 = section.addInstance();
    const section11 = section.addInstance();
    const section12 = section.addInstance();

    /**
    * Write custom configuration values to the imported modules.
    */
    mcspi1.$name = "CONFIG_MCSPI0";
    mcspi1.mode = "MULTI_CONTROLLER";
    mcspi1.SPI.$assign = "SPI4";
    mcspi1.child.$name = "drivers_mcspi_v1_mcspi_v1_template0";
    mcspi1.mcspiChannel.create(2);
    mcspi1.mcspiChannel[0].$name = "CONFIG_MCSPI_CH0";
    mcspi1.mcspiChannel[1].$name = "CONFIG_MCSPI_CH1";

    const edma = scripting.addModule("/drivers/edma/edma", {}, false);
    const edma1 = edma.addInstance({}, false);
    edma1.$name = "CONFIG_EDMA0";
    mcspi1.edmaDriver = edma1;
    edma1.edmaRmDmaCh[0].$name = "CONFIG_EDMA_RM0";
    edma1.edmaRmQdmaCh[0].$name = "CONFIG_EDMA_RM1";
    edma1.edmaRmTcc[0].$name = "CONFIG_EDMA_RM2";
    edma1.edmaRmParam[0].$name = "CONFIG_EDMA_RM3";

    debug_log.enableUartLog = true;
    debug_log.uartLog.$name = "CONFIG_UART0";
    debug_log.uartLog.UART.$assign = "UART0";
    debug_log.uartLog.UART.RXD.$assign = "UART0_RXD";
    debug_log.uartLog.UART.TXD.$assign = "UART0_TXD";
    debug_log.uartLog.child.$name = "drivers_uart_v2_uart_v2_template0";

    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 = 0x41010000;
    mpu_armv73.size = 15;
    mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";

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

    mpu_armv75.$name = "CONFIG_MPU_REGION4";
    mpu_armv75.baseAddr = 0x60000000;
    mpu_armv75.size = 28;
    mpu_armv75.accessPermissions = "Supervisor RD, User RD";

    mpu_armv76.$name = "CONFIG_MPU_REGION5";
    mpu_armv76.baseAddr = 0x80000000;
    mpu_armv76.size = 31;

    default_linker1.$name = "memory_configurator_default_linker0";

    general1.$name = "CONFIG_GENERAL0";
    general1.linker.$name = "TIARMCLANG0";

    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 = 0x40000;
    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].manualStartAddress = 0x701D0000;
    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[7].$name = "LOG_SHM_MEM";
    region1.memory_region[7].auto = false;
    region1.memory_region[7].manualStartAddress = 0x701D4000;
    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[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;

    /**
    * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
    * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
    * re-solve from scratch.
    */
    mcspi1.SPI.CLK.$suggestSolution = "EQEP0_A";
    mcspi1.SPI.D0.$suggestSolution = "EQEP0_STROBE";
    mcspi1.SPI.D1.$suggestSolution = "EQEP0_INDEX";
    mcspi1.mcspiChannel[0].CSn.$suggestSolution = "EPWM12_A";
    mcspi1.mcspiChannel[1].CSn.$suggestSolution = "EQEP0_B";

  • Hi,

    I am using MCU_PLUS_SDK_AM263x@09.01.00, and in your syscfg i see you are using MCU_PLUS_SDK@07.03.01. I do not have MCU_PLUS_SDK@07.03.01 installed. Is this what I should be using for the syscfg?

    Furthermore, I see you are using syscfg version 1.20, while I am using syscfg version 1.18. I was using 1.20 but switched back to 1.18, as I ran into a bug with syscfg 1.20, where on 1.20 using MCU_PLUS_SDK_AM263x@09.01.00, I was not able to configure GPIOs (please see screenshot below). This was resolved by switching to syscfg 1.18, after discussing with Gunter (first comment), and as 1.18 was recommended by the MCU_PLUS_SDK_AM263x@09.01.00 user guide

  • Hi,

    For me its working fine with MCU_PLUS_SDK_AM263x@09.01.00  and  syscfg versions {1.18.0+3266}.

    In case you still face the same issue, I would suggest proceeding with latest release i.e; 9.2.

    /**
    * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
    * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
    * @cliArgs --device "AM263x_beta" --package "ZCZ" --part "AM263x" --context "r5fss0-0" --product "MCU_PLUS_SDK_AM263x@09.01.00"
    * @versions {"tool":"1.18.0+3266"}
    */

    /**
    * Import the modules used in this configuration.
    */
    const mcspi = scripting.addModule("/drivers/mcspi/mcspi", {}, false);
    const mcspi1 = mcspi.addInstance();
    const debug_log = scripting.addModule("/kernel/dpl/debug_log");
    const mpu_armv7 = scripting.addModule("/kernel/dpl/mpu_armv7", {}, false);
    const mpu_armv71 = mpu_armv7.addInstance();
    const mpu_armv72 = mpu_armv7.addInstance();
    const mpu_armv73 = mpu_armv7.addInstance();
    const mpu_armv74 = mpu_armv7.addInstance();
    const mpu_armv75 = mpu_armv7.addInstance();
    const mpu_armv76 = mpu_armv7.addInstance();
    const default_linker = scripting.addModule("/memory_configurator/default_linker", {}, false);
    const default_linker1 = default_linker.addInstance();
    const general = scripting.addModule("/memory_configurator/general", {}, false);
    const general1 = general.addInstance();
    const region = scripting.addModule("/memory_configurator/region", {}, false);
    const region1 = region.addInstance();
    const section = scripting.addModule("/memory_configurator/section", {}, false);
    const section1 = section.addInstance();
    const section2 = section.addInstance();
    const section3 = section.addInstance();
    const section4 = section.addInstance();
    const section5 = section.addInstance();
    const section6 = section.addInstance();
    const section7 = section.addInstance();
    const section8 = section.addInstance();
    const section9 = section.addInstance();
    const section10 = section.addInstance();
    const section11 = section.addInstance();
    const section12 = section.addInstance();

    /**
    * Write custom configuration values to the imported modules.
    */
    mcspi1.$name = "CONFIG_MCSPI0";
    mcspi1.inputSelect = "0";
    mcspi1.sdkInfra = "LLD";
    mcspi1.errorCallbackFxn = "MCSPI_lld_errorCallback";
    mcspi1.transferMode = "CALLBACK";
    mcspi1.transferCallbackFxn = "MCSPI_lld_transferCallback";
    mcspi1.mode = "MULTI_CONTROLLER";
    mcspi1.SPI.$assign = "SPI0";
    mcspi1.SPI.CLK.$assign = "SPI0_CLK";
    mcspi1.SPI.D0.$assign = "SPI0_D0";
    mcspi1.SPI.D1.$assign = "SPI0_D1";
    mcspi1.child.$name = "drivers_mcspi_v1_mcspi_v1_template_lld0";
    mcspi1.mcspiChannel.create(2);
    mcspi1.mcspiChannel[0].$name = "CONFIG_MCSPI_CH0";
    mcspi1.mcspiChannel[1].$name = "CONFIG_MCSPI_CH1";
    mcspi1.mcspiChannel[1].CSn.$assign = "EPWM12_A";

    debug_log.enableUartLog = true;
    debug_log.uartLog.$name = "CONFIG_UART0";
    debug_log.uartLog.UART.$assign = "UART0";
    debug_log.uartLog.UART.RXD.$assign = "UART0_RXD";
    debug_log.uartLog.UART.TXD.$assign = "UART0_TXD";
    debug_log.uartLog.child.$name = "drivers_uart_v2_uart_v2_template0";

    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 = 0x41010000;
    mpu_armv73.size = 15;
    mpu_armv73.accessPermissions = "Supervisor RD+WR, User RD";

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

    mpu_armv75.$name = "CONFIG_MPU_REGION4";
    mpu_armv75.baseAddr = 0x60000000;
    mpu_armv75.size = 28;
    mpu_armv75.accessPermissions = "Supervisor RD, User RD";

    mpu_armv76.$name = "CONFIG_MPU_REGION5";
    mpu_armv76.baseAddr = 0x80000000;
    mpu_armv76.size = 31;

    default_linker1.$name = "memory_configurator_default_linker0";

    general1.$name = "CONFIG_GENERAL0";
    general1.linker.$name = "TIARMCLANG0";

    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 = 0x40000;
    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].manualStartAddress = 0x701D0000;
    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[7].$name = "LOG_SHM_MEM";
    region1.memory_region[7].auto = false;
    region1.memory_region[7].manualStartAddress = 0x701D4000;
    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[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;

    /**
    * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
    * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
    * re-solve from scratch.
    */
    mcspi1.mcspiChannel[0].CSn.$suggestSolution = "SPI0_CS0";

  • Hi

    This works for me as well, and also works on my syscfg locally. However, the problem is this is assigning SPI0 as multichannel controller, and allowing K2 pin to be used as SPI0 CS pin channel 2 (your SPI instance field is set to SPI0, not SPI4)

    In my application, I need to bind K2 pin to SPI4, not SPI0, which your syscfg when loaded does not allow me to do either.

    So in my end:

    1. Setting SPI0 instance to mutlichannel allows me to select K2 pin as second CS channel to SPI0 no problem (just like your above example)

    2. Setting SPI4 instance to multichannel does NOT allow me to select K2 as second CS channel to SPI4

    I am actually a bit surprised that K2 as allowed to be chosen as CS1 for SPI0 instance in the syscfg , as from the data sheet, K2 does not work with SPI0 (see below attached from data sheet) and only works for SPI4

    Hovering over SPI4 instance second channel (see screen shot below of green arrow), where I am trying to select K2, the syscfg tool reports that K2 is only available on SPI0, and not available for SPi4, which does not seem to line up  with the data sheet:

  • Hi all,

    could we get a response on the question about sysconfig and the pin usage above as soon as possible?

    Thanks!

    --Gunter

  • Hi Gunter,

    The issue will be resolved in upcoming release as it's a syscfg issue not a McSPI. Already bug has been created fpr the same. 

    Let you know if you have any other queries.

    Regards,
    Akash Soni.