Skip to content

Instantly share code, notes, and snippets.

@shima-529
Created August 24, 2021 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shima-529/07cd4d2725b9fc89e5afb5695c7284dd to your computer and use it in GitHub Desktop.
Save shima-529/07cd4d2725b9fc89e5afb5695c7284dd to your computer and use it in GitHub Desktop.
#include "stm32f0xx.h"
#include "sysclk_systick.h"
#include "i2c.h"
#include "greenpak.h"
int main(void) {
sysclk_HSI48_init();
i2c_init();
GPIOB->MODER &= ~GPIO_MODER_MODER4_Msk;
GPIOB->MODER |= (GPIO_MODE_OUTPUT_PP << GPIO_MODER_MODER4_Pos);
GPIOB->ODR &= ~(1 << 4);
gp_erase();
gp_nvm_write();
gp_invoke_por();
while(1) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment