Skip to content

denisbog/stm32

Repository files navigation

stm32

used hardware

  • nucle board used only for STM-Link to programm external STM32 controller (NUCLEO-L476RG)
  • generic STM32 controller development board that contains a LSE (low speed external oscailator), battery, flash storage (https://stm32-base.org/boards/STM32F407VET6-STM32-F4VE-V2.0.html)
  • UART usb controller (used to interact with the board)

used software

  • STM32 IDE Cube
  • PulseView
  • screens command line application used to communicated with the board over UART

implementation steps

  /* USER CODE BEGIN Check_RTC_BKUP */
	if (HAL_RTCEx_BKUPRead(&hrtc, RTC_BKP_DR0) == 0xcafe) {
		return;
	} else {
		HAL_RTCEx_BKUPWrite(&hrtc, RTC_BKP_DR0, 0xcafe);
	}
  /* USER CODE END Check_RTC_BKUP */
  • connect to the board using UART USB controller;
  • implement a simple text menu accessible via UART;
  • accessing onboard external FLASH; Note: generic board is using the SPI1 to link to the FLASH; this way have to disable debugging functionality(set Serial Wire for debug option not Trace Asynchronous Sw) since we have to use the pin for SPI1
  • logging button click epock time (4 bytes) to external flash
  • using PulseView to debug the byte order of the address when reading/storing the 4 bytes to external flash
		send_address[2] = temp;
		send_address[1] = temp >> 8;
		send_address[0] = temp >> 16;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published