2020-10-01 07:14 AM
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
2020-10-18 11:01 PM
Hello
Sorry for late feedback.
Are you using stsw-stub010 firmware package ?
Best regards
Nathallie
2020-10-19 01:14 AM
2020-10-19 01:41 AM
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
2020-10-19 06:49 AM
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
2020-10-19 08:38 AM
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
2020-10-20 05:06 AM
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
2020-10-21 02:53 AM
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