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.

peripheral ownership



Where in the documentation do you discuss peripheral ownership?  The only reference I have found is in the booting where it says CPU1 must set ownership before it boots CPU2...

I assume we just set a register like when we assign memory ownership etc. correct?

I am trying to assign ADCs to CPU2 so I can configure them from CPU2.

Can you split ownership of ADCs, ie: ADCA is CPU1, ADCBCD is CPU2?

  • Hi Rob,

    I assume we just set a register like when we assign memory ownership etc. correct?

    Correct. You configure the register CPUSELx to give ownership of peripherals to CPU1 or CPU2. This register can be configured by CPU1 only and by default all the peripherals are owned by CPU1.

    Can you split ownership of ADCs, ie: ADCA is CPU1, ADCBCD is CPU2?

    Yes, you can do that. Refer CPUSEL11 register in TRM.

    Regards,

    Vivek Singh

  • Is there anywhere in the documentation where you highlight which register sets are 'system global' or CPU1 only, and which ones need to be set by each processor?

    For example, I am trying to setup the ADCs on CPU2 CLA, with the above mentioned switch of ownership I can now program the ADC regsiters from CPU2, but it appears I also have to set the SysClkRegs as well?  ie: on CPU 1 I call InitSysCtrl and SysCtlClockSet and SysCtlAuxClockSet appropriately and if I run the ADCs on CPU1 (without the CPUSEL adjusted) everything works well, but it appears that I need to set these sysclkRegs again on CPU2?

    When I look at your header file F2837xD_sysctrl.h

    //---------------------------------------------------------------------------

    // SYSCTRL External References & Function Declarations:

    //

    #ifdef CPU1

    extern volatile struct WD_REGS WdRegs;

    extern volatile struct SYNC_SOC_REGS SyncSocRegs;

    extern volatile struct DMA_CLA_SRC_SEL_REGS DmaClaSrcSelRegs;

    extern volatile struct DEV_CFG_REGS DevCfgRegs;

    extern volatile struct CLK_CFG_REGS ClkCfgRegs;

    extern volatile struct CPU_SYS_REGS CpuSysRegs;

    #endif

    #ifdef CPU2

    extern volatile struct WD_REGS WdRegs;

    extern volatile struct DMA_CLA_SRC_SEL_REGS DmaClaSrcSelRegs;

    extern volatile struct CLK_CFG_REGS ClkCfgRegs;

    extern volatile struct CPU_SYS_REGS CpuSysRegs;

    #endif

    this implies to me that CLkCftRegs are either readable by both or specific to each CPU.  When I read the registers while debugging from CPU2, they are not set to what they were set to on CPU1 so it appears they are custom to each processor.  I would have thought clocking was globally setup by CPU1?

    I think I need to have a clear understanding of which registers are specific to each processor and which are global (only need to be set by CPU1)

    For example, it appears that the USB is only on CPU1, and GPIO is controlled by CPU1.  in addition the peripheral or CPUSEL is a CPU1only... are there any other CPU1 only sets?

    The problem I'm seeing is the ADCs on CPU2 are not yet generating interrupts, so something is missing in their setup when I moved them from CPU1 to CPU2.  I'm starting with having them generate interrupts on the CPU first, then I'll move them to the CLA.

    If I follow the same setup that I use on CPU1, there must be something different, like the assigning of ownership, that is still not set allowing them to function on CPU2.  I wasn't setting the SysCtlClockSet and SysCtlAuxClockSet thinking CPU1 had set that up?  that may be all it is.  Is that the case?

     

  • Hi Rob,

    Is there anywhere in the documentation where you highlight which register sets are 'system global' or CPU1 only, and which ones need to be set by each processor?

    In register structure  table there is note which mention the register which are accessible by CPU1 only.

    Following snapshot from "Table 2-16. System Control Base Address Table".

    For example, I am trying to setup the ADCs on CPU2 CLA, with the above mentioned switch of ownership I can now program the ADC regsiters from CPU2, but it appears I also have to set the SysClkRegs as well?

    Yes, peripheral clock control is with each CPU hence if ownership is changed then clock need to be enabled from CPU which owns the peripheral.

    this implies to me that CLkCftRegs are either readable by both or specific to each CPU.  When I read the registers while debugging from CPU2, they are not set to what they were set to on CPU1 so it appears they are custom to each processor.  I would have thought clocking was globally setup by CPU1?

    ClkCfgRegs are accessible from both the CPU but access is shared based on semaphore. Please refer CLKSEM register definition for more detail on this.

    For example, it appears that the USB is only on CPU1, and GPIO is controlled by CPU1.  in addition the peripheral or CPUSEL is a CPU1only... are there any other CPU1 only sets?

    Yes, USB is only available on CPU1 and this info is provided in device datasheet (section 6.5 Bus Architecture – Peripheral Connectivity). As mentioned earlier, look for "Only available on CPU1" in device manual.

    If I follow the same setup that I use on CPU1, there must be something different, like the assigning of ownership, that is still not set allowing them to function on CPU2.  I wasn't setting the SysCtlClockSet and SysCtlAuxClockSet thinking CPU1 had set that up?  that may be all it is.  Is that the case?

    Clock enable, yes but global clock setting need not to be done by CPU2 if already done by CPU1.

    Regards,

    Vivek Singh