Others: hardware and software

Discuss hardware and software design challenges, including NOR flash storage, OTA updates, component ID, and thermal management.

cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

Couple of days ago, I configured the mcu (stm8l-discovery) in low power mode to see the current consumption. But if i run the same code again, I was not able to see the same results. The mcu is not entering the low power mode

#include "iostm8l.h"#include <stdint.h>#include <stdio.h>#include "defs.h"main(){ CLK_DIVR = 0x00; // Set the frequency to 16 MHz while(1) { if (PWR_CSR2 & 0x01 == 0x01) { break; } } PWR_CSR2 |= (1<<1); while (1) { halt(); }}

VSrin by Associate II
  • 883 Views
  • 4 replies
  • 0 kudos

Does anyone have a problem writing to Eeprom? When I try to write say a '0x80, a '0x3f' is reported as written So I stored my data as 4 bit nybbles, , which works (I'm using the discovery Board.) Russ

char *address = (char *) 0x4000; void flashwrite(char dat)   {       // thanks to https://github.com/midnight-wonderer/stm8-eeprom-bug/blob/workaround-//method/src/firmware.c  // one Mr. Sarun Rattanasiri                                            wh...

RHell by Associate
  • 584 Views
  • 0 replies
  • 0 kudos