Setting PB2CLK for PIC32MZ2048EFG144 - Unlock Sequence
Posted: Wed May 13, 2020 1:29 am
Hello experts,
I'm needing to change PB2CLK for correct UART speed, though I've come across need to exercise an unlock sequence before being able to change the prescaler. Presently the UART has to be declared at 4x speed in Flowcode with the default SYSCLK division of 2 (PB2CLK = 100MHz), so fundamentally I'm trying to exercise the following in a C block... PB2DIVbits.PBDIV=8
I realise I'm being a little lazy here, but wondering if anyone has successfully exercised the applicable unlock sequence in a C block, or can offer a few pointers?
Thank you in advance,
Brendan
I'm needing to change PB2CLK for correct UART speed, though I've come across need to exercise an unlock sequence before being able to change the prescaler. Presently the UART has to be declared at 4x speed in Flowcode with the default SYSCLK division of 2 (PB2CLK = 100MHz), so fundamentally I'm trying to exercise the following in a C block... PB2DIVbits.PBDIV=8
I realise I'm being a little lazy here, but wondering if anyone has successfully exercised the applicable unlock sequence in a C block, or can offer a few pointers?
Thank you in advance,
Brendan