Hi, I'm new to TI chips so sorry for silly questions.
When I send data via TG0 I get the same data on the same TG0. I suppose the SPI loopback is enabled. How can I change LoopBack using Halcogen?
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.
Hi, I'm new to TI chips so sorry for silly questions.
When I send data via TG0 I get the same data on the same TG0. I suppose the SPI loopback is enabled. How can I change LoopBack using Halcogen?
Hi Zhaohong and thank you for your response.
Global control register 1 is 0x01000003
IO loopback test control register is 0x00000000
I have checked values after initialization.
Seems that loopback is disabled but I'm receiving the same data like loopback is ON
They are not shorted, I'm sure.
I'm trying to communicate with SD card using tms470MF066. tms470MF066 is Master. SPI signals are generated fine from MOSI and SD card successfully responds. The blue is MOSI and yellow is MISO
Nevertheless, when I debug I get in my rxBuffer the same data I have sent via txBuffer.
Would you be kind to have a look at my simple code please. I'm run out of ideas what could be wrong. Drivers generated using Halcogen
Actually I have only 2 channel oscilloscope, but knowing that the same signals are sent repeatedly I was able to edit the following image to show MISO(upper yellow), CLK (yellow in the middle), MOSI (blue)
In green region I'm sending 0x40 0x00 0x00 0x00 0x00 0x95 to SD card
in red region array of 10 0xFF 's was sent in order to receive response from SD card. (card responds as expected)
CS is always asserted (using GPIO)
Any clues?
Thank for your help, Zhaohong.
Eventually, I had to write my own function to read coming data from RXBUF as spiGetData() function does not read the register. Now I have so many doubts about correctness of Halcogen generated codes.