STM32F401 and PlatformIO

So I am trying to find a new micro to use. Arduino had too many limitations, ESP32 has I2C issues with certain libraries and I just want milk that tastes like real milk. I do not think that it is all that much to ask that your crap just works and does what its meant to. And so here I am trying to find something new that is not all that expensive and kind of just works. I may have found it with the STM32 Blackpill and ST-Link.

Setup in platformIO is just a matter of selecting the right board type and letting the software download the required files and editing the dot ini file to setup certain parameters.

Pretty much all i did here was change the upload protocol to stlink because i have never been able to get dfu to work ever for whatever reason. The other thing I like about using an external programmer is that I get full debugging of the code and i do not have to pull the board in and out of my circuit all the time to program it, or in the case of the arduino’s pulling the IC off the board all the time.

Actually the main thing I am after is the ability to have interupts on any pins I like, not just on the 2 that arduino gives. If the bloody libraries for ESP32 would work right with the SI5351a i would not have had to go down this path. But alas I cant fix it and I am not sure those who are smarter than me can either. Plenty of hacks out there as workarounds, but that just ends up breaking other things I have on the I2C bus. So for now, it looks like I might be going blackpill. And you know what they say, once you go black, you never go back.


ESP32 and SI5351a

Welcome to my tail of woe.

What seems like a long time ago now, back in April, I stopped using ATmega micro controllers and settled on using ESP32 for everything. SEE: . Back then, i made note that some had been reporting issues with Jason Mildrum’s Etherkit library and ESP32. I did not have this problem, thankfully. Until, today that is and now everything is broken.

I think the reason why I never had any issues like the guys have reported here: was because my ESP32 install was a rather old one, I think it was even from before espressif took over things. And then I switched over to using PlatformIO SEE and a bunch of things got updated and my old very working implementation got screwed up.

I have tried to narrow down what the issue is, but its beyond my skills as a pretend programmer. So I started to try and rule things out. Its not an actual hardware issue, because other I2C things all work fine. and I can get the SI5351 to work using other libraries, like the one from Adafruit and the one I am now using above from Pavel Milanes SEE: . So after losing days screwing about with this and chasing my tail, I now get to go and rewrite a whole bunch of code that no longer works. So the crap on my bench actually works again.

So tonight, i want to get the code working on the WSPR brick again so that tomorrow I can fix the PA i destroyed and then get it on the air over the Xmas/New Years break and ro also get the receiver thats part build on the protoboard working also. Cant make a receiver without a bloody signal source LOL. No family for Xmas this year because of covid. So tomorrow I will work on stuff in my office.


Go me, I got this one working in pretty quick time. I am actually rather happy now. One more to do for the VFO on the protoboard and


Programming With PlatformIO

So sometime ago I stopped using the Arduino environment for programming micro controllers and started using PlatformIO. It offers a lot of advantages over the former and anyone who has programmed before using other environments will like the fact that you can use a really well featured IDE.

Programming for me was something I learned over 20 years ago, as a game developer for MUDS, which were text based roll playing games, written in C on linux. Mostly I was using the Kdevelopment IDE, but at other times I have used Netbeans and Eclipse when dabbling with languages like Ruby and LUA.

The great thing about PlatformIO is that its platform independent and supports over 800 different boards and you are not locked into using a particular IDE, you can use pretty much whatever IDE you like. I am using Visual Studio, but it supports about a dozen other IDE so you can choose what you like to work with.

The major benefits of using platformIO is that you have a propper debugger built in and that you have greater control over where your libraries are installed. If you look in the navigation pane to the left of the IDE, you will see that the non core libraries that I used are all installed in a directory called LIB within the project. This means when you do backups of your projects, you keep everything together where it needs to be.

For me, this means I have code, schematic, board layout, test documents and datasheets for the one project all together in one place and if i chance something, i have it tracked. There are a few things that work differently than with the Arduino IDE, like there are no drop down menus for selecting things, but once you get your head around using and editing the ini file, you will find that you have a lot more control over the things you are trying to do. And often, that level of control is very useful to have.

If you are looking to graduate from Arduino, give platformIO a go, I think you will be pleasantly surprised and enjoy your coding for ham radio projects just that little bit more.


Pi Pi Pi Piledriver

The boards I designed and ordered have arrived today, so i hastily threw together the Pi board to make sure I did not screw anything up. Everything is legit and I no longer have the stupid low power symbol coming on all the time. Everything is now powered off a 5A psu and even with the LCD, wireless keyboard and mouse and hard drive hanging off it, its happy as. No more losses in crappy USB cables. The other thing on the board is a bandpass filter. So i can play with some of the rf generation techniques that you can do with the pi. More on that later.


Programming, I Don’t Like It

So i have been working on the talkie walkie and this time around, I have done something totally different. I am using a different SI5351A module and a different LCD screen. And here in lies the problem. To many changes at once and none of them wanted to work out the bag. Firstly I normally use a 16×2 lcd and I2C backpack. Cannot fit that in the case so its an 8×2 and regular parallel connection. Second thing is I used the Eat A Fruit style si5351, where i normally used the ones from QRP Labs and the drama there is the different crystals used and the fact that I was still using a very old version of the SI5351 library. So i upgraded it, and broke all my code, fixed all my code and now it actually works. Oh one last thing about the LCD, seems there are 2 different types of 8×2’s one with 16 pins and one with 14 pins. I think i smoked the 16 pin one, before my PSU went into current limiting. Not sure what the deal is, but anyway, after much messing around, this part of the project is actually working.