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.

TMS320F28388D: assigning peripherals to CPU2

Part Number: TMS320F28388D

Greetings, 

Am going through the tutorial on the FSI for dual CPU. It has this instruction:

// Assign ownership of FSIRxB, FSIRxC, FSIRxD modules to CPU2.
// FSIRxB - instance 18; FSIRxC - instance 19; FSIRxD - instance 20
//
SysCtl_selectCPUForPeripheral(SYSCTL_CPUSEL16_FSI, 18, SYSCTL_CPUSEL_CPU2);

This is supposed to set one of the FSU's to CPU2. The comment says that the "18" in the code defines the "instance" of said peripheral. However, I can nopt find any documentation that would help me to understand why this is.

Ultimately, I want to assign an SCI peripheral to CPU 2. How can that be done using the "SysCtl_selectCPUForPeripheral" routine and how do I know what "instance" I would use???

Thanks, 

David

  • Hi,

    Please refer to API comments for description on peripheral Instance. PFB the description for reference. Basically, the peripheral instance is there to define the bit position for each peripheral instance in CPUSELx register. E.g. For SCIA the peripheral instance value would be 1.

    //! The \e peripheralInst parameter is the instance number for example
    //! 1 for EPWM1, 2 for EPWM2 so on.For instances which are named with alphabets
    //! (instead of numbers) the following convention needs to be followed.
    //! 1 for A (SPI_A), 2 for B (SPI_B), 3 for C (SPI_C) so on...
    //! For peripherals with different RX and TX instances which are named
    //! with alphabets, the following convention needs to be followed.
    //! 1 for TX_A (FSITX_A), 2 for TX_B (FSITX_B) and so on...
    //! 17 for RX_A (FSIRX_A), 18 for RX_B (FSIRX_B) and so on...

    Thanks

    Vasudha

  • Thanks, 

    I did actually read the comments you posted. 

    I was interested in what the underlying logic of the numbering scheme. It seemed arbitrary. However, upon further examination, I see that the base register for the RX is 16+1. The relation to powers of two is what I missed the first time.

    It (sort of) makes sense now.

    Regards,

    David