Part Number: TDA2HV
We are working on the ADAS's TDA2x platform.We designed our custom board using a TDA2HV processor.We use using the vision SDK for development.We are using the lvds_vip_multicam_view use case. We want to use SPI's data to in our use case.For SPI interfacing TI provided the utils_Mcspi.c and utils_MCspi.h file, This file only contains SPI initialization function.So, how we can write and read into the SPI transmit and receive buffer.
My query is,1) Can you please share SPI'slave example code in which we can run in the use case?
Please let me know if you need the more information from our side.
In reply to Prasad Konnur:
Thanks for the reply,
As of now, Our TDA2x Soc is working on the Slave mode.On slave side, we receive the data perfectly from the master (MOSI).But when we send the data from Slave to Master the First bit is missing on master side(MISO line).We used the SPI mode 3(CPOL = 1and CPHA = 1) for communication.
if we send the data 129((binary)1000 0001) from the salve then we receive the master side 3 (0000 0011).
I have attached CRO screenshot for your information.Inside screenshot yellow line is for SCLK and the blue channel is for the MISO line.
My query is,
1) How to resolve this data going wrong on the master side?
Please suggest us some solution to resolve this issue.
Please let me know if you need more information on our side.
In reply to parth Modi:
The TDA2 SOC when configured in McSPI slave mode, does not control the clock. It will only responds to the clock sent from the external master. So it cont send the bit before master initiates the clock.
How have you connected the slave on the board? Are the track lengths of MOSI, MISO and clock same?
Our track length is as per below
MOSI 312.61 + 4476.41 = 4789.02 mils
MISO 306.11 + 3208.36 = 3514.47 mils
CS# 211.32 + 3103.34 = 3314.66 mils
CLK 248.9 + 3117.13 = 3366.03 mils
We connected the Master device to the level shifter.
Tad2x( slave) <-> levelshifter<->MCU(Master)
We are getting GIO_reclaim stuck after calling GIO_issue for one time.if we call this function for 2 times than it works well(i.e one every time we need to call issues the 2 times data and reclaim claim the 2 times data).
I have attached my code for your information.
What is region to behind the struck the GIO_Reclaim?
We want to take the SPI data on every instance of receive interrupt from the master.Can please share me some example code to implement it.
Only for the first time you need 2 GIO_issue, This is to prime the data to be sent as default response from slave.
The driver internally maintains the queue for the response to be sent in case of slave mode.
After this you can do GIO_reclaim followed by a GIO_issue.
In the attached code I see that the issue is called only during priming.
You can refer the example itself, which does multiple GIO_issue and reclaims.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.