cancel
Showing results for 
Search instead for 
Did you mean: 

STUSB1602 ALERT registers and Alert# pin not clearing when read

gabrielharrison
Associate II

Hi,

We have the STUSB1602  implemented, can read the registers and they appears to be giving correct information but the Read/Clear _ALERT registers are not clearing when they are read.

If the _ALERT_MASK registers are configured to use the Alert# pin this stays in the alert state as well as the registers.

Does anything need to be done to make the registers clear when read?

Gabriel

7 REPLIES 7
NBALL
ST Employee

​Hello

Sorry for late feedback.

Are you using stsw-stub010 firmware package ?

Best regards

Nathallie

gabrielharrison
Associate II

Hi,

Yes, we are using drivers I found here: https://github.com/usb-c/STUSB1602

Regards,

Gabriel

NBALL
ST Employee

​Hello Gabriel,

Please use package on st.com which are up to date.

There is 1 based on stm32F072 and an other based on stm32F446:

See here https://www.st.com/en/interfaces-and-transceivers/stusb1602.html#tools-software

Best regards

Nathalie

gabrielharrison
Associate II

Hi,

I've updated the driver and still have the same issue.

Does anything need to be done to make the registers clear when read?

Gabriel

NBALL
ST Employee

Hello Gabriel,

Are you using our HW or you own board ?

If you have build your own board, can you please confirm that an external pull up is present on Alert pin ?

Then if you are using our FW, STUSB16xx_HW_IF_Alert_Manager is reading the ‘trans’ registers. Reading the register clears its interrupts. Then Alert pin is released.

Best regards

Nathalie

gabrielharrison
Associate II

Hi,

We are using our own board which is not STM based. I can confirm there is a 10k external pull-up

I have stripped things back and I am calling STUSB1602_Alert_Raise_Get() directly rather than using STUSB16xx_HW_IF_Alert_Manager()

I was also reading the registers as a 8 byte block from reg 0x0B.

I have changed our code to do single reads of each register and the ALERT pin is now clearing correctly.

Thank you for your assistance. Would it be worth including in the datasheet that multibyte reads don't clear the RC registers?

Gabriel

gabrielharrison
Associate II

Hi,

It appears that sometimes the interrupt is not getting raised so I am looking the official example STM32F446_MB1303_DRP_VDM

I can see STUSB16xx_HW_IF_Alert_Manager() is called in CAD_StateMachine() but I can't see any calls to CAD_StateMachine(). Am I missing something?

Gabriel