Issue with QuickLogic GitHub Repository for Blinking LED on SparkFun Thing Plus – QuickLogic EOS S3 Dev Kit

Hi everyone,

I’m trying to work with the QuickLogic GitHub repository to create a simple program that blinks the LED on the SparkFun Thing Plus – QuickLogic EOS S3 Dev Kit. I’m using the HAL (Hardware Abstraction Layer) library provided in the repository, but it seems like it’s not fully developed or is missing some components.

Has anyone else experienced a similar problem or have any suggestions on how to fix this? I would also appreciate any recommendations on how to work with the HAL in this repository, or if anyone knows of a better alternative for making the LED blink.

Thanks in advance for the help!

I think you should try another library instead. The HAL library is not fully developed.

You can try following our guide here where we use PuTTy to make the LEDs blink

I already tried the commands on PuTTY but I want to make a little program blinking the LEDs at different frequencies so I need something to write in the registers like the HAL library.

Enviado desde Outlook para Android

I don’t believe the issues is with the HAL. If you take the qt_app examples from the qorc-sdk, for example the bootloader. You can replace the main. with something like this
#include “Fw_global_config.h”

#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include “FreeRTOS.h”
#include “queue.h”
#include “task.h”
#include “spi_flash.h”
#include “eoss3_hal_gpio.h”
#include “dbg_uart.h”
#include “flash_defines.h”
#include “bootloader_defines.h”

#define USER_BUTTON_GPIO_NUM (0) //PAD 6, GPIO is connected to User Button
#define BLUE_LED_GPIO_NUM (4) //PAD 18, GPIO is connected to Blue LED
#define GREEN_LED_GPIO_NUM (5) //PAD 21, GPIO is connected to Green LED
#define RED_LED_GPIO_NUM (6) //PAD 22, GPIO is connected to Red LED

int main(void)
{
#if defined(ICCARM)
SOFTWARE_VERSION_STR = “qorc-sdk/qt-apps/qt_bootloader(v2.1) (IAR)”;
#elif defined(GNUC)
SOFTWARE_VERSION_STR = “qorc-sdk/qt-apps/qt_bootloader(v2.1) (GCC)”;
#endif

qf_hardwareSetup();

dbg_str("\n\n");
dbg_str( "##########################\n");
dbg_str( "Sparkfun Thing+ Bootloader\n");
dbg_str( "SW Version: ");
dbg_str( SOFTWARE_VERSION_STR );
dbg_str( "\n" );
dbg_str( __DATE__ " " __TIME__ "\n" );
dbg_str( "##########################\n\n");

nvic_init();
HAL_GPIO_Write(RED_LED_GPIO_NUM, 1);

}

The HAL_GPIO_Write call will set or clear the LED.

I have not had a chance to test this code, but I know that the HAL_GPIO_Write works as long as you have configured the pin correctly in the qt_apps/qt_bootloader/src/pincfg_table.c which is already included in the bootloader example.

You also need to ensure that the internal LDO is not switched OFF this is taken care of in the qt_apps/qt_bootloader/src/qf_hardwaresetup.c
If you have download the application into flash that the then J2 and J3 jumper need to be removed and then the board can be reset allowing the program to be read from external flash

1 Like