cancel
Showing results for 
Search instead for 
Did you mean: 

Can i write to the entire port to data

thannara123
Associate III

Hai experts .

Can i wrte data to the  entire Port as follows

GPIOB->ODR |= 0x0000;
HAL_Delay(1000);
GPIOB->ODR |=0xffff;

Whenever i write like wise the SFR register shows correct value in Debug mode 

But in Hardware its not working .whats the wrong with me ?

11 REPLIES 11
Danish1
Lead II

Which bit or pin in the port is your LED connected to?

Looking at the video I suspect the processor is stm32f103. But it would be useful if you could confirm that.

Is this a board that you designed and built? Or a commercial one (if so, please tell us which one)?

Do you have access to a voltmeter, so you can look at the voltage on the pins? That would help you to know if the problem is the software or the hardware (e.g. pin not soldered, LED the wrong way round).

TDK
Guru

> I think GPIOB->ODR canot write entire data 

> Here can see the data change in ODR regiter 

Aren't these statements at odds with each other? You can keep thinking that, but the issue is elsewhere. Still not seeing your full code.

If you feel a post has answered your question, please click "Accept as Solution".