cancel
Showing results for 
Search instead for 
Did you mean: 

How to read initialization from L9663 data using SPI?

Ondrej1
Associate II

Hello,

I stareted to develop PSI5 interface with L9663. My point is to read initialization data via SPI. If I set DOUT1 as direct data output (CH1_CR1->DOUT1_SE = 0), I am able to measure received data on this pin. But if  I set this pin as interrupt (CH1_CR1->DOUT1_SE = 1), then I am not able to read initialization data via SPI (but interrupt is active). 

My procedure:

1. set READ_INIT_DATA1 bit in CH1_CR1

2. Enable PSI5 (with requierd settings)

3. Reading initialization data by this command:

Ondrej1_0-1707316125721.png

After this  INITDATA_RDY in SR3 is not set. Is this procedure correct? What I should write to "init_buf_id" and "Register" bits? I tried to make loop for all possible combinations, but there wasn't any data.

 

Thank you for your response.

6 REPLIES 6
SCONI.8
ST Employee

Hi,

INITDATA_RDY (SR3[2]) not set indicates that no valid init data were captured by the device (initdata buffer is empty).

Did you check if your frame format is compliant with the initdata capture requirements? (20 bits payload: 3 bits Frame control bits, 1 status bit, 16 data bits).

Hi. Yes, I have already checked it and format is not compliant.

SCONI.8
ST Employee

So, I assume that not compliant frame the main motivation of the problem! (That's why you can see initdata on doutx in mode2 operation, but the device cannot capture initdata).

DWA_46810
Associate II

Hello, I am a first-year graduate student at Shandong University of Technology. I am currently using l9663. Can you provide me with some example programs? Even just a function for writing data to the l9663 register will do. I want to test whether there is a problem with my board.If possible, I would really appreciate it.

 

Hi,

The source code for both drivers and demo are present in AutoDevKit www.st.com/autodevkitsw 

Read quick start guide here:

https://community.st.com/t5/autodevkit-ecosystem/update-quick-start-guide-for-bms-boards-and-examples-version-2-4/td-p/748960

 

Best Regards,

AutoDevKit Team

 

Hello, thank you for your answer, but it seems that it's not quite what I need. Do you have a routine for the L9663 here? This is a PSI5 transceiver.