cancel
Showing results for 
Search instead for 
Did you mean: 

STGAP1AS - Unable to write to configuration registers, but able to read all registers with their default values.

ycetin
Associate II

Hi everyone,

I have six STGAP1AS GDs with daisy chain SPI configuration. I can read all registers with their default values according to the datasheet but I can't write to any configuration register despite I followed to recommended configuration flow (datasheet p.49/70).

Also got some errors in STATUS1-2-3 registers such as: SPI_ERR, REGERRL.

Is there any example or advice to test GDs? I can provide all of register results, any help would be greatly appreciated.

Thanks in advance.

Best,

1 ACCEPTED SOLUTION

Accepted Solutions
ycetin
Associate II

Hello Cristiana and thank you for your answer.

Actually, my mistake was about sending commands & data. I was think the configuration procedure as like: Command+Data for GD1, Command+Data for GD2, .... until the last GD. However, I became be able to configure GDs when I modify the procedure to: command for GD1, command for GD2, .... and then after CS toggle; data for GD1, data for GD2, ...

Hopefully this will help to who had similar problems.  

View solution in original post

2 REPLIES 2
Cristiana SCARAMEL
ST Employee

Hello @ycetin​ and welcome to the ST Community.

To switch the device to the configuration mode the StartConfig command must be sent. This command is accepted when the SD line is low only.

If the command has been correctly received and interpreted, the IC registers writing is enabled.

The SD pin must be kept low during the whole configuration procedure, which is terminated by the StopConfig command.

If the SD pin is raised during the configuration procedure the device immediately quits the configuration mode causing a fault error indicated by the REGERRL and REGERRR bits.

In this case all the changes operated on device configuration are undone and the previous configuration is restored.

In addition, what VDD value are you supplying the device?

Pay attention that the logic input thresholds and output ranges vary according to VDD voltage.

There may be issues interpreting logical signals between device and MCU.

Finally, do all drivers give errors or just one or someone?

Let me know if these info are useful to progress in your project.

If you feel a post has answered your question, please click "Accept as Solution"
ycetin
Associate II

Hello Cristiana and thank you for your answer.

Actually, my mistake was about sending commands & data. I was think the configuration procedure as like: Command+Data for GD1, Command+Data for GD2, .... until the last GD. However, I became be able to configure GDs when I modify the procedure to: command for GD1, command for GD2, .... and then after CS toggle; data for GD1, data for GD2, ...

Hopefully this will help to who had similar problems.