Problem with STM32F107 and I2C1
Posted: Fri Mar 15, 2019 2:30 pm
Hi all,
I'm currently facing an issue with I2C1 on an OLIMEX P107 board.
I first try the example provided and I2C1 on remapped pin PB8/PB9 is working just fine.
Configuration is like this in the board.h file:
Now moving the issue I'm facing. I would like to use I2C1 on pin PB6/PB7 (alternate default) since my own design is using those pins.
So I change the board.h file to this:
Code is running on the board but can get any clock signal on the scope.
If someone as an hint It would be great,
Thank in advance,
Jeremy
I'm currently facing an issue with I2C1 on an OLIMEX P107 board.
I first try the example provided and I2C1 on remapped pin PB8/PB9 is working just fine.
Configuration is like this in the board.h file:
Code: Select all
/*
* Port B setup:
* PB8 - Alternate O.D. (I2C1 SCL, remapped).
* PB9 - Alternate O.D. (I2C1 SDA, remapped).
*/
#define VAL_GPIOBCRL 0x88844480 /* PB7...PB0 */
#define VAL_GPIOBCRH 0x38BBB8FF /* PB15...PB8 */
#define VAL_GPIOBODR 0xFFFFFFFF
Now moving the issue I'm facing. I would like to use I2C1 on pin PB6/PB7 (alternate default) since my own design is using those pins.
So I change the board.h file to this:
Code: Select all
/*
* Port B setup:
* PB6 - Alternate O.D. (I2C1 SCL).
* PB7 - Alternate O.D. (I2C1 SDA).
*/
#define VAL_GPIOBCRL 0xEE844480 /* PB7...PB0 */
#define VAL_GPIOBCRH 0x38BBB888 /* PB15...PB8 */
#define VAL_GPIOBODR 0xFFFFFFFF
Code is running on the board but can get any clock signal on the scope.
If someone as an hint It would be great,
Thank in advance,
Jeremy