Skip to content

Alternating I2C transactions fail on STM32F4 #1165

Answered by salkinium
SumedhP asked this question in Q&A
Discussion options

You must be logged in to vote

You're using resumable functions wrong by not polling the runTransaction for completion.

You need to wrap all calls to readRegister/writeRegister with RF_CALL_BLOCKING() to keep polling the transaction until it's finished.
You're currently kinda getting around it by using momd::delay_ms(100); after each write, but that doesn't actually check if the transaction finished.

For consistency you should also use RF_WAIT_WHILE() instead of the while loop in read-/writeRegister.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@salkinium
Comment options

@salkinium
Comment options

@SumedhP
Comment options

@salkinium
Comment options

Answer selected by SumedhP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants