Hello,
Before I tell you mt problem I'll give some history into the project i'm working on.
A while ago (approximately 2 years) I developed my own startup code for this microcontroller, and despite having one small bug (story for another time) it always worked accordingly, given the proper workaround for the mentioned bug. The thing is that now I want to use the SPI2's chip select 1, which is the alternate function one of ball d3 and its default functionality is SPI2ENA.
The problem is that I can't change the pinumx values for some reason. I know I have to write specific values on the KICK registers, so I put a breakpoint on the specific line that isn't working and notice that it isn't doing anything to the registers. This means that for some reason the KICK registers aren't properly configured so I tried the following:
- I check the KICK registers and notice that their value is 0x0, which is strange, because writing to those registers is the first thing that function does.
- I manually tried to modify their values and noticed that I can't (I used the registers window to verify this).
- This lead me to believe that I'm probably not in a privileged mode. After that I checked The M bits value and verified that I am in a privileged mode (10011, supervisor mode)
Is there a reason as to why I can't write anything to those registers? Am I not enabling power to the IOMM module? Am I not enabling clock to the module?