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.

3 REPLIES 3
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).