Wio-e5 wip (#2265)

* Wio-e5 / STM32WL wip

* Stubbing some FS stuff out

* Wio-e5 / STM32WL wip

* Stubbing some FS stuff out

* Wio-e5 / STM32WL wip

* Stubbing some FS stuff out

* Wio-e5 / STM32WL wip

* Stubbing some FS stuff out

* LittleFS compiles. Can't check with actual device.

* make cppcheck happy again

* Guard against accelerometer thread

* Missed a spot

* Upload via ST-LINK

* Derive MAC address from UID

* upload port

* Trunk it

* Guard it

* Maybe fix the cache error on startup.

* Latest RadioLib ref to fix SubGHZ

* revert nasty Sub-GHz Hack

* Boots and radio inits with RadioLib 6.0, LittleFS doesn't seem to work

---------

Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: GUVWAF <thijs@havinga.eu>
This commit is contained in:
Ben Meadors
2023-06-01 07:14:55 -05:00
committed by GitHub
parent 1524c2365f
commit a491ceefcd
25 changed files with 1153 additions and 108 deletions

View File

@@ -11,8 +11,18 @@ void updateBatteryLevel(uint8_t level) {}
void getMacAddr(uint8_t *dmac)
{
for (int i = 0; i < 6; i++)
dmac[i] = i;
// https://flit.github.io/2020/06/06/mcu-unique-id-survey.html
const uint32_t uid0 = HAL_GetUIDw0(); // X/Y coordinate on wafer
const uint32_t uid1 = HAL_GetUIDw1(); // [31:8] Lot number (23:0), [7:0] Wafer number
const uint32_t uid2 = HAL_GetUIDw2(); // Lot number (55:24)
// Need to go from 96-bit to 48-bit unique ID
dmac[5] = (uint8_t)uid0;
dmac[4] = (uint8_t)(uid0 >> 16);
dmac[3] = (uint8_t)uid1;
dmac[2] = (uint8_t)(uid1 >> 8);
dmac[1] = (uint8_t)uid2;
dmac[0] = (uint8_t)(uid2 >> 8);
}
void cpuDeepSleep(uint32_t msecToWake) {}