buslik 0 Posted October 4, 2013 Share Posted October 4, 2013 I have found working solution. But for me it look ugly. uint8_t command = 0x55; uint16_t u16Temp = 0; u16Temp = GPIO_ReadOutputData(GPIOA)&0xFF00; u16Temp |= command; GPIO_Write(GPIOA, u16Temp); Is there better way to output 8bit value to PORTA without affecting other pins? Quote Link to post Share on other sites
Bingo600 0 Posted October 9, 2013 Share Posted October 9, 2013 I'm to lazy to look it up , but i'm quite sure there is some kind of "register mask" that can be set , so that any writes will only affect the low half of the port /Bingo Quote Link to post Share on other sites
chicken 630 Posted October 9, 2013 Share Posted October 9, 2013 HWREG is a macro that maps writes to specific pins to the proper memory-mapped GPIO. Here someone wrapped it into a useful FAST_GPIOPinWrite macro: http://forum.stellarisiti.com/topic/520-stellaris-gpiopinwrite-vs-hwreg/ Ignore, didn't realize this is the STM32 forum Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.