BlackPill STM32F411CE PA11 PA12 Digital Out Not Working
Posted: Mon Feb 07, 2022 12:34 pm
Hello,
Environment Win10 Pro 64, IDE2 RC3 and IDE 1.8.16, STLink V3 Programmer
I have a simple Digital Output Pin test function that i am using to test Nine VL53LOX XShut pins and PA11 & PA12 do not toggle any ideas please?
I have turned off USB Support in IDE and even unplug the USB and powered the breadboard which the Black Pill is mounted on from external 3.3v.
So the only connection to the board is my oscilloscope to monitor the digital output pins.
Where PA11 is always low and PA12 is always high, but the rest of the pins toggle as expected.
I have also tried a different Black Pill in a different breadboard and results are same.
Many thanks in advance IMK
#define VL53LOX_1_XSHUT_PIN PB12
#define VL53LOX_2_XSHUT_PIN PB13
#define VL53LOX_3_XSHUT_PIN PB14
#define VL53LOX_4_XSHUT_PIN PB15
#define VL53LOX_5_XSHUT_PIN PA8
#define VL53LOX_6_XSHUT_PIN PA11
#define VL53LOX_7_XSHUT_PIN PA12
#define VL53LOX_8_XSHUT_PIN PA15
#define VL53LOX_9_XSHUT_PIN PB3
// --------------------------------------------------- VL53L0X_XShut_PinTest() -----------------------------------------------------
void VL53L0X_XShut_PinTest( void )
{
pinMode( VL53LOX_1_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_2_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_3_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_4_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_5_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_6_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_7_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_8_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_9_XSHUT_PIN , OUTPUT );
while( TRUE )
{
digitalWrite( VL53LOX_1_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_1_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_2_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_2_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_3_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_3_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_4_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_4_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_5_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_5_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_6_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_6_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_7_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_7_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_8_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_8_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_9_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_9_XSHUT_PIN , LOW );
delay( 10 );
} // end while forever
}
Environment Win10 Pro 64, IDE2 RC3 and IDE 1.8.16, STLink V3 Programmer
I have a simple Digital Output Pin test function that i am using to test Nine VL53LOX XShut pins and PA11 & PA12 do not toggle any ideas please?
I have turned off USB Support in IDE and even unplug the USB and powered the breadboard which the Black Pill is mounted on from external 3.3v.
So the only connection to the board is my oscilloscope to monitor the digital output pins.
Where PA11 is always low and PA12 is always high, but the rest of the pins toggle as expected.
I have also tried a different Black Pill in a different breadboard and results are same.
Many thanks in advance IMK
#define VL53LOX_1_XSHUT_PIN PB12
#define VL53LOX_2_XSHUT_PIN PB13
#define VL53LOX_3_XSHUT_PIN PB14
#define VL53LOX_4_XSHUT_PIN PB15
#define VL53LOX_5_XSHUT_PIN PA8
#define VL53LOX_6_XSHUT_PIN PA11
#define VL53LOX_7_XSHUT_PIN PA12
#define VL53LOX_8_XSHUT_PIN PA15
#define VL53LOX_9_XSHUT_PIN PB3
// --------------------------------------------------- VL53L0X_XShut_PinTest() -----------------------------------------------------
void VL53L0X_XShut_PinTest( void )
{
pinMode( VL53LOX_1_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_2_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_3_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_4_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_5_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_6_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_7_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_8_XSHUT_PIN , OUTPUT );
pinMode( VL53LOX_9_XSHUT_PIN , OUTPUT );
while( TRUE )
{
digitalWrite( VL53LOX_1_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_1_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_2_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_2_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_3_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_3_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_4_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_4_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_5_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_5_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_6_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_6_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_7_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_7_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_8_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_8_XSHUT_PIN , LOW );
digitalWrite( VL53LOX_9_XSHUT_PIN , HIGH );
delay( 10 );
digitalWrite( VL53LOX_9_XSHUT_PIN , LOW );
delay( 10 );
} // end while forever
}