2020-07-05 11:47 PM
2020-07-06 05:22 AM
Read out and check/post the GPIOB registers content.
What's your hardware? How do you change the PB9 pin's voltage? Measure voltage directly on the pin.
JW
2020-07-08 01:43 AM
Hi Sir,
Below are the configuration as follows:
This divided down voltage is connected to Boot0/PB9. Before key-press, boot0/PB9 is at ground due to the divider.
I am currently testing the board with B+ 4V external, and 3.3V using the ST link programmer during debugging.
I did some testing yesterday and got the following observations:
(Before the test, the program was confirmed to work with PB7 as the switch input pin. Only made changes to re-configure PB7 to PB9 with EXTI and GPIO change over)
[ref manual says nboot0=1 to boot from flash but cubepgmr says otherwise. However, tested out, nboot0 needs to be checked to boot from flash, I think]
ie before key-press, mcu is already powered up by 3V and should boot-up according to option byte for set#1 and boot0 pin for set#2.
Any clue from the above observations?
2020-07-20 07:22 PM
Hi Sir,
Perform the below test code for PB7, PB9 and check IDR reading:
(External circuit to these 2 pins are disconnected)
while (1)
{
opr_state = GPIOB->IDR & GPIO_IDR_ID7;
opr_state = GPIOB->IDR & GPIO_IDR_ID9;
delay_ms(200);
}
Result:
1V 1.2V 1.4V 1.45V 1.5V 2V
PB7: 0 0 0 1 1 1
0V 0.1V 0.2V 0.3V 0.4V 0.5V ---- 1V 1.3V 1.4V 1.5V 2V
PB9: 0 0 0 0 0 0 1 1 1 1 1
OK OK OK OK <--- hang at delay----> OK OK OK
Observations:
momentary high current drawn of > 8mA. If power supply current limit
is set at 1mA, can see a momentary voltage drop then return to 1V.
for PB9.
However, the voltage at PB9 at the time of testing item #12 was 1.8V.
is 2.75V. Same condition as (1) – (3) below. Set hanged after start-up.
voltage resulting in hanged state.
after start-up.