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.

CCS/OMAP-L138: Access omap L138 PSC register - PTCMD

Expert 1060 points
Part Number: OMAP-L138
Other Parts Discussed in Thread: OMAPL138, MATHLIB

Tool/software: Code Composer Studio

Dear Experts.

I have question about OMAP-L138 register access.

I progrom the SPI communications using OMAP-L138 sample code.

And there's some problem that the interrupt(INT1 line) related to tx/rx buffer status doesn't occur.

I couldn't find any problem to set the AINTC interrupt and SPI.

During the degugging the function of Int PSCModuleControl(..) in psc.c, I found there's any changes after I write to PTCMD register.

Also I couldn't see any changes in PTSTAT register.

But other register related to the PSC can Read or Write and see the changes.

This is the one of symptom I tried.

Set the PTCMD.GO[0]bit.

But after set in the register map or memory browser, it still reamin to the default.

The below picture shows the state after set PTCMD.GO[0[0]

So this is what I am wondering.

1. Even though it actually set the PTCMD, PSTAT register, when I debug with Code Composer Studio(6.1.2.00015) this value is hard to catch with IDE.(it is too fast to catch up)

2. It is hard to access this register because PTCMD,PTSTAT register has protected.

3. Does SPI occurs the interrupt after active PTCMD.GO[x] set to 1 ?

4. What's another issues which I need to suspect?

Best Regards,

Jay.

  • Hi,

    I've notified the rtos team. Their answer should be posted here.
    In the mean time can you share if you're using MCSDK or is this a bare metal example?

    Best Regards,
    Yordan
  • As YOrdan mentioned, please specify the SDK from which you are using the SPI driver.

    Usually the interrupt from a module will occur after the power transition has completed so the interrupts will occur only after SPI module is activated through PSC registers.

    Regards,
    Rahul
  • Dear Rahul,

    Thank you for your supports.

    I use OMAPL138_StarterWare_1_10_04_01_setup package.

    And refer to the following source.

    ti\OMAPL138_StarterWare_1_10_04_01\examples\lcdkOMAPL138\spi\spi.c

     

    this is my environments,

    EVM: LCDK OMAP L138

    OS  : Windows 7 Ultimate K (SP1) 32bit

    Tool: Code Composer Studio 6.1.2.00015 (Compiler version : TI v5.2.5)

    Product and Repositories : OMAPL138_StarterWare_1_10_04_01

                                      DSPLIB_C674x_3_4_0_0

                                      MATHLIB_C674x_3_1_1_0

                                      BIOS_6_42_01_20

                                      NSP_1_10_03_15

                                      NDK_2_24_03_35

    Best Regards,

    Jay.

  • Jay
    I would recommend relying on a gel file to do all the PSC initialization for all the modules including SPI , to see if it helps.
    From whatever you have described I don't see any direct relation between PSC and SPI - unless the program code you are using to enable the SPI module clock via PSC is not correct - to eliminate that possibility see if you can just use the Gel file for chip initialization first and then try your SPI test.

    PSC registers are not protected , but yes the state transitions will happen in a few cycles so may not be easy to catch etc in register memory window.

    you can also sanity check the PSC status of various modules , you can run the OMAPL138 debug gel file, which gives you the status of various LPSC associated with the peripherals.

    processors.wiki.ti.com/.../OMAP-L1x_Debug_Gel_Files