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 Rishabh Garg:
In reply to parth Modi:
As per your suggestion, I explored the MCSPI example code and I made demo code to test the MCSPI1 on our side. I run this code and I get all the initializing function going pass and but the code is stuck at the GIO_reclaim(mcspiHandle, (Ptr *) &dataparam, NULL, NULL);. I measured the SPI clock and SPI_cs0 line for confirmation to SPI initialization is worked or not.But it not works. I cant get any SPI clock and cs0 line low.
I called start_spi_sample_new(Void) for all the operation. I attached my code for your information.
I have some below queries for that,
1) Is there any mistake in flow?
2) Can you please share your suggestion to work this code?
Please let me know if you need more information on our side.
According to your suggestion, i check in the code and below is my observation,
GIO_Create() function is already called by the creat steam function.
then, We are calling GIO_issue,
We also checked the return value of MCSPI Handler and it is not null.
During debugging, i observe that in prime function, GIO_issue is getting fail with below error.
"Failed to issue empty buffer to stream"
I am attaching my debug logs and sample application for your reference.
Please provide your inputs for resolving this.
I have asked MCSPI expert to help you further.
In reply to Prasad Konnur:
We have used utility fuction as per your suggession,but Utils_dmaInit() is failing with error "UTILS: DMA: Utils_dmaInit() for instance 0 ... FAILED (-128)".
We find out the reson for the failure and it is happening due to we have commented out below two function.
/*retVal += BspUtils_memInit();
if (BSP_SOK != retVal)
GT_0trace(BspAppTrace, GT_ERR, "Error: App MEM Utils Init failed!!\r\n");
retVal += BspUtils_prfInit();
GT_0trace(BspAppTrace, GT_ERR, "Error: App PRF Utils Init failed!!\r\n");
If we tried to uncommented this fuction then during code compilation we are getting below error
program will not fit into available memory. run placement with alignment
fails for section "GROUP_1" size 0xf816696 . Available memory ranges:
IPU1_0_DATA_MEM size: 0xb00000 unused: 0x70ceaa max hole: 0x70cea8
So, please suggest us the possible solution to resolve this compilation error.
We have attached the source code and debug log and comiplation error snapshot for your referance.
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.