Welcome to the blog post I wish I had read two days ago.
From now on I will make it a rule to get oneperipheral working at a time. Why? Because it turns out if you don’t; they might interfere with each other in a bad way.
This particular one saved us a PCB spin. If I did not get the devkit, this is one of the things I could not foresee. That’s why my new rule is to test one peripheral at the time, then together!
Maybe it is getting a screen working, reading from an SD card or simply getting I2C working. Get them working one at a time, then together. Oh, and did I say I2C is simple? Let me take you on my ~20 hour journey getting it to work in my setup!
Just a short update from me today: I received the devkit from WaveShare (only two days, wow) and it looks good! I like the layout and there’s excellent documentation. Of course the mechanical aspects are all on the cheaper side, but what do you expect for this price? Over all I’m super happy so far and would recommend anyone looking for a devkit, to search their site for something appropriate (not affiliated).
I’m not formally educated as an electronics engineer, though I am a software engineer. One of the things that happens with engineering is that you make mistakes. Because of this, I always design my first revision of a PCB for debugging.
This means that is has to be easy to test voltages, configure boot states and isolate the various functional blocs of the design. Things of particular interests could be; power supply, charge circuits, external peripherals (DAC, ADC, Shift registers, LCD, encoder etc) and whatever that’s new for you at the time.
Let’s dive into the few and simple techniques I use when I intentionally design for debug!
I love it when mCU manufacturers makes it easy to get started for free. Even more when they use technologies I know from before. No esoteric compiler, no weird debugging system I’d have to learn and research.
When I started this blog post I thought I’d have to document many steps in order to get to tool-chain and the IDE up and running, but I was wrong.
I’s been my experience that when setting out to design a custom PCB on a new chip it pays to have some known board to debug off of. This can be useful even if there’s no relevant peripherals on there. Either add them, or simulate them, or maybe even double check that that pin actually is tristated when it’s supposed to!