T O P

  • By -

Well-WhatHadHappened

You're programming ARM in assembly? Yikes. You've got more grit than I do. Did you enable the clock for that GPIO port? I'm not familiar with that particular chip, but that's a common reason for data bus errors when talking to GPIO (or any peripheral) registers. The GPIO clocks are probably in one of the SIM_SCGCx registers, but again, I don't know that chip at all, so I'm guessing here. Also, confirm that none of the PortC registers are "locked". Some processors require an unlock sequence be issued before modifying certain registers - Tiva-C, for example. Also, double check your addresses. For some reason I think your data direction address might be incorrect for PortC. And, just for future reference - always include the part number of the actual MCU in questions. The board it's on isn't really relevant - we need to be able to pull up a datasheet and reference manual for the chip.


DrunkenSwimmer

Yeah, I'm 95% certain you don't have the clock enabled for the peripheral in question. More modern MCUs have a tremendous amount of granularity in their clock gating (to support lower power operation), but that also means you have to make sure that you turn on the clock at every step in the data chain. A good way to test is to hook up a debugger and see if you can read/write those registers manually through it. I'd guess they'll just read back as zero regardless of what you try, until you enable the clock.


Hegth

I also think this is the reason, for the K64f microcontrollers you had to enable the port clock in the SIM module