Reading AS5600 registers with ARM using I2C Transactions
Posted: Sat Dec 27, 2025 2:28 pm
Following considerable frustration fruitlessly attempting to get I2C working on ARM (STM32F411) to simply address an AS5600 hall position sensor in hardware mode, whilst working perfectly in software mode, I happened to chance upon mention that I2C will only operate in transaction mode on ARM.
To cut a long story short, I'm confused at how to implement the same working approach with I2C transactions, not entirely helped by limited explanations of what's going on 'under the hood' for reads and writes in transaction mode.
In summary, I'm attempting to simply read the status register 0x0b of an AS5600 rotary hall sensor. Unfortunately, high-speed I2C in software mode is a non-starter, but would be good to have a working understanding of Transaction Mode in any case.
From the basic example project 'I2C Transaction Example', Transaction_Initialise is perfectly clear, but I'm trying to drill down to the precise I2C Transaction sequence required to perform the following - exemplified as simple I2C transactions that work in software mode. I've made various attempts without progress, so time to ask for help.
1. START
2. TRANSMIT BYTE '0b01101100' (chip 7-bit I2C address plus trailing Write bit)
3. TRANSMIT BYTE 0x0b (address of register to read)
4. RESTART
5. TRANSMIT BYTE '0b01101101' (chip 7-bit I2C address plus trailing Read bit)
6. RECEIVE BYTE (data from register address 0x0b)
7. STOP
This is the first time I've been forced to use necessary I2C 'transactions' on ARM, so clarification of the above will carry over to future projects.
Many thanks,
Brendan
To cut a long story short, I'm confused at how to implement the same working approach with I2C transactions, not entirely helped by limited explanations of what's going on 'under the hood' for reads and writes in transaction mode.
In summary, I'm attempting to simply read the status register 0x0b of an AS5600 rotary hall sensor. Unfortunately, high-speed I2C in software mode is a non-starter, but would be good to have a working understanding of Transaction Mode in any case.
From the basic example project 'I2C Transaction Example', Transaction_Initialise is perfectly clear, but I'm trying to drill down to the precise I2C Transaction sequence required to perform the following - exemplified as simple I2C transactions that work in software mode. I've made various attempts without progress, so time to ask for help.
1. START
2. TRANSMIT BYTE '0b01101100' (chip 7-bit I2C address plus trailing Write bit)
3. TRANSMIT BYTE 0x0b (address of register to read)
4. RESTART
5. TRANSMIT BYTE '0b01101101' (chip 7-bit I2C address plus trailing Read bit)
6. RECEIVE BYTE (data from register address 0x0b)
7. STOP
This is the first time I've been forced to use necessary I2C 'transactions' on ARM, so clarification of the above will carry over to future projects.
Many thanks,
Brendan