HWREG(GPIO_PORTF_BASE + GPIO_O_LOCK) = GPIO_LOCK_KEY_DD;
HWREG(GPIO_PORTF_BASE + GPIO_O_CR) |= 0x01;
HWREG(GPIO_PORTF_BASE + GPIO_O_LOCK) = 0;
pls give information abt this
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
While you report being "new" - you've discovered a special requirement of this vendor's newer devices. Many other, "new" users have made that same discovery - in their case most often because they've failed to achieve the desired behavior from that specific MCU pin.
That pin is PF0 - and it - and one other - default into a special format - which (it would appear, to the "new" hundreds who've been so victimized) to be inadequately highlighted and/or safeguarded by all existing vendor publications.
Code block you show attempts to unlock that pin - but does not carry on and, "re-purpose" the pin. (that - being the, "raison d'etre" for the unlocking...)
This vendor - I believe - does quite a good job in providing illustrative & generally useful code examples - often with detailed commenting.
Suspect that a more systematic approach would speed & enhance your, "ARM coding & understanding." Issue you raise impacts 2 out of 64 (or more) MCU pins - I'd suggest your avoiding that pin for now - and focus instead on first reading & then experimenting with the various MCU peripherals. The peripheral driver user's guide, the MCU manual, and the many sound, code examples provided will certainly keep you busy - and aid your development.
While at sea - at night - many "interesting" points of light may register. Yet - efficient sailors know to focus upon the key ones - no matter how enticing - the "unusual/unexpected" ones appear...