Search This Blog

Radio Guy Tees

Radio Guy Tees
Radio Guy T-Shirts

Friday, 15 August 2025

Can you still beat the Cube?

Well,

In a feable attempt to prove that I can still write some code, I've been writing software to program the ADF4351 from last time using the STM32CubeIDE and a Nucleo board. The Nucleo boards are really neat because they are from the manufacturer so there is no risk of counterfeit devices, and they are also really low cost for the component count - they even include an on-board STLink programmer (which containst an MCU itself). Amazing really.

The first part of the development is to define the additional GPIO pins needed, in this case we need a CS line (for chip select - only really needed if we have more than one device), and the LE pin which is toggled after each registers data is sent.


Once thats done, I've defined a few variable to help me on my way:


Then we have the main routines:


And finally the output of the SPI pins viewed through a logic analyser:


This is exactly as required.

STM32 provide the HAL (Hardware Abstraction Layer) library to give access to the MCU periferals and also the CMSIS library to access the internal CPU (which is an ARM Cortex from a 3rd party).

Using the Nucleo boards is very easy with STMCubeIDE, but can also now be programmed with the Arduino board manager addon for STM32.

I will now try and generate the same output using the Arduino IDE and see how I fare.

Interesting, don't you think?






No comments:

Post a Comment