How to create private registers in the STM32 (programming in C langage)
Hello everyone,
I’m working with an MCU STM32F401 (NUCLEO Board) which receives via I2C the measurements sent by a sensor VL53L1. I would like then to be able to intervene at any time by interrupting the communication between the MCU and the sensor to change certain sensor’s parameters such as timmingbudget, ROI (region of interest) etc or simply stop and restart the measurement. For this I’m using the MCU as a bridge between the PC and the sensor. The PC will send the data via I2C to the MCU and the MCU in an interrupt routine will pass the received data as a parameter by calling the functions of the Vl53l1. I want those data to be written in registers.
My question is how to create addresses for these registers in the MCU’s memory. I read on several forums that simple #define can create registers in the memory of the MCU. Do you think there are other things to consider?
Thank you all.
PS: i'm using HAL library.
