Meteor M-N2 Images

Sunday 15 January 2017

VLF/LF Receiver implemented in microprocessor - Introduction (Part 1 of n)



Alberto, I2PHD, developed a VLF to MF receiver entirely in a microprocessor utilising the STM32F4 Discovery board. I was intrigued by this so I purchased a STM32F746 Discovery board. The F7 board uses the faster ARM Cortex M7 processor rather than the M4 processor used in the STM32F4 range of boards.

However, I soon found that the STM32F7 Disco board does not make the same GPIO pins available to use. Specifically only the third analogue-digital converter (ADC3) of three is available to use. Alberto's design uses ADC's 1 & 2 in double buffered mode and this approach is fundamental, consequently I realised that I would not be able to use this board for the receiver. By the time I had worked this out ST had released the STM32F746-Nucleo board, this board is similar to the Discovery board except it makes all the GPIO pins available to use but it does not have a built in LCD display.

I was not able to compile the source code written for the F4 board for the F7 board. Whether this was through my lack of experience or for some other reason I do not know as the code is meant to be compatible between the two devices. Subsequently, I proceeded to rewrite the code to use the Hardware Abstraction Layer (HAL) provided by ST. Due to the fragmented and incomplete nature of documentation for the HAL a great deal of experimentation and trial & error was involved. However, this did mean that my understanding of C programming for embedded microprocessors and associated debugging using gdb increased quickly.

Currently the status of this project is as follows:
  • Code for STM32F4 ported to work with the STM32F7 devices using HAL firmware library version 1.3.0*
  • To overcome the lack of an LCD on the Nucleo board an inexpensive LCD was purchased on ebay which uses the ILI9341 LCD controller and this was integrated into the code.
  • To overcome zero documentation on how to use the touch screen capabilities of the LCD I bought I implemented control using a rotary encoder.
  • I have added a spectogram function which shows a display of the signals being received - this is a work in progress.
* I have looked at using the newer 1.5.1 HAL firmware but there have been significant changes made to the operation of some of the functions and I don't intend to rewrite the code to handle these at the moment.

The picture at the top of this post shows the receiver receiving the MSF time signal on 60kHz.

I plan a series of blog posts to document this project. My plan is for posts covering the following topics:
  • Setting up the development environment - using Eclipse IDE, GCC compiler, OpenSTM32, gdb.
  • My implementation and the hardware connections, particularly covering the LCD and rotary encoder.
  • Specifics around the rotary encoder control and the LCD.
  • The spectogram function.
  • Wrap-up, including some problems I have yet to overcome.
The code is available on github link

No comments:

Post a Comment