Wednesday, May 4, 2022

Nuvoton NUC980 IIOT Board Experiments (Interface ST7735 SPI display)


Introduction

  • Nuvoton NUC980  is a 300 Mhz ARM processor.
  • Has a host of peripherals onboard: 64/128 MB RAM, 2 Ethernets, 2 CAN masters, some 8 UARTS, SPI, I2C , etc
  • It comes with Linux, uboot and a buildroot system for generating system assets.
  • A popular board is the NUC980 IIOT board
  • The major advantage is that this processor is available for a low cost of 5$ (2021)

Intention
  • Try and see how fast the system is
  • Performance of python etc.
  • Given that it was a low RAM system, how convenient would it be write a program in python.
  • Maybe interface a device say a Display.

Experiments
  • The tar ball that Nuvoton provides is an approx 8 GB virtual machine running Ubuntu 18.04.
    • One can run this virtual image on an VM emulator.
    •  The recommended is VMWARE but it ran comfortably even in an Oracle VirtualBox VME.
  • After logging into the VM and on running a make nuc980_defconfig it generated the uboot, linux and other assets.
  • On Linux one can use nuwriter to flash the SPINAND. 
    • A run.ini file is needed as configuration to the nuwriter
    • It specifies destination of writing: SPINAND flash, SDCARD, RAM, etc.
    • Each destination has section for which the relevant files to be flashed has to be provided.
  • One problem that was noticed was that even though the flash writing progressed successfully, the system would display a few bytes as follows:
NUC980 IBR 20180813 
Boot from SPI-NAND
Nand boot!      #S
finish SPI dow&*


Python support
  • Idea was to try writing a user space driver for an SPI device like the ST7735 in python
  • A python driver for Pimoroni displays can be found.
  • It was modified to drive a color display to show time.
  • Python took a long time loading but after it was loaded in RAM, it was fast enough to update the display
  • Also FB-TFT could have been a good way of interfacing the display
  • Below are 2 sample videos.








No comments: