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.

toggling between clocks

Other Parts Discussed in Thread: TMS320F28377D

Hi all

i have an TMS320F28377D DSP chip in my board, the DSP is connected to external clock oscillator, output frequency is 20MHz.

my question is, how do i change the source of my CPU clock and what is the default clock?

best regards

Shimon

  • Hi Shimon,

    Please review the TRM section titled "Clocking" and see if that answers your questions.

    Regards,

    Joe

  • i didnt find this examples and other explenations when i checked the TRM yesterday, ill try to work with that.
    Thanks!

    BTW, the reason i posted here is because i tried to work with one of the SPI modules (which worked fine in the EVAL-Board) but now the clock line is seems to be dead. i figured that the problam is in the configurations of the CPU clock. ive noticed that my clock is 10MHz (which is the default) so i hope that this is the reason why i dont see the SPI clock while writing.

    you think that this might be the source of the problem?

    and again, thank you!
  • You mention that the SPI signal worked fine on the eval board. Did your GPIO configuration change between boards?  Are you able to see the other SPI signals? Changing the source of the CPU clock has no effect on the output of the SPICLK. Please be sure to read the Clocking section of the TRM and the Datasheet for a full description of the clocking network as Joe has previously mentioned. Are other portions of your code not working or is it only that you are unable to see the SPICLK operate as expected.

    I hope the questions above get you on track. 

    -Mark

  • Hi Mark

    iv'e managed to make the SPI A channel work. i had some problems with the configurations of the clock and now its working.
    but now i have to work with the two other SPI channels and they seems to be not working.

    i configured them the same as the channel that work and i double checked the GPIO numbering. all i want to see is the clk pin working while sending a message every 1msec so i dont use interrupts at the moments.

    can you help me with that as well?

    Shimon
  • Shimon,

    SPIA communication link works, correct? 

    You are trying to implement SPIB and *** comms as well?

    If your SPIA channel is working as expected, you can actually just copy and paste the register configurations and change "SpiaRegs" to "SpibRegs" or "SpicRegs". this will ensure that at least all of the register configurations are done the same. Be sure to check the Peripheral clock enable bits, as well as all of your GPIOs at least one more time.

    Thanks,
    Mark

  • SPIA works fine.
    i'm trying to implement SPIB as well.
    i did all you recommended, copied the SPIA configuration registers and changed their name to b, i checked and enabled the peripheral clock enable, and did another check of the GPIO's initialization.

    i really dont understand why it doesnt work for me, maybe it has something to do with the fact that im trying to activate two SPI channels in my program and somehow the DSP blocks it?
  • There is nothing that will block you from using both peripherals at the same time. Does SPIB work if you disable SPIA? What exactly is going wrong with SPIB? Are you not able to see any pin activity? Do your register configuration writes go through (do you see the bits changing after you write to them). Are you using CPU2 for any of these functions?


    -Mark
  • even when i disable SPIA, SPIB doesnt work. i'm working only with CPU1.
    the thing that goes wrong in SPIB is that i cant see the clock in my scope, while in A i see the clock.

    while waiting for your response, i checked in the datasheet and TRM again and noticed that the MUX of the SPI gpio's might be changing in some channels. is it possible?
    iv'e seen that in channel A the mux is "1" is it the same in all other spi channels relevant gpio's?

    and another request, can you send me an example that contains all 3 spi channels that already works?
  • Shimon,

    It sounds like you are not configuring the GPIOs correctly for SPIB. Please look at the GPIO Muxing table in the datasheet for the proper muxing locations. Not all SPI muxing is in location 1 of the mux.

    -Mark
  • Shimon ,

    Have you resolved this problem?

    Regards,
    Mark
  • yes. the problem was solved. sorry for the delay.