8000 esp32: Merge with master up to version 1.17.3.b1 · tdamsma/pycom-micropython-sigfox@870ceac · GitHub
[go: up one dir, main page]

Skip to content

Commit 870ceac

Browse files
author
Daniel Campora
committed
esp32: Merge with master up to version 1.17.3.b1
1 parent 1bf377b commit 870ceac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+93
-57
lines changed

drivers/sx127x/sx1272/sx1272.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ IRAM_ATTR void SX1272OnDio0Irq( void )
10721072
int8_t snr = 0;
10731073

10741074
// Store the packet timestamp
1075-
SX1272.Settings.LoRaPacketHandler.TimeStamp = mp_hal_ticks_us();
1075+
SX1272.Settings.LoRaPacketHandler.TimeStamp = mp_hal_ticks_us_non_blocking();
10761076

10771077
// Clear Irq
10781078
SX1272Write( REG_LR_IRQFLAGS, RFLR_IRQFLAGS_RXDONE );

drivers/sx127x/sx1276/sx1276.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ IRAM_ATTR void SX1276OnDio0Irq( void )
12371237
int8_t snr = 0;
12381238

12391239
// Store the packet timestamp
1240-
SX1276.Settings.LoRaPacketHandler.TimeStamp = mp_hal_ticks_us();
1240+
SX1276.Settings.LoRaPacketHandler.TimeStamp = mp_hal_ticks_us_non_blocking();
12411241

1242 10000 1242
// Clear Irq
12431243
SX1276Write( REG_LR_IRQFLAGS, RFLR_IRQFLAGS_RXDONE );
-2.51 KB
Binary file not shown.

esp32/bootloader/lib/liblog.a

140 Bytes
Binary file not shown.

esp32/bootloader/lib/libmicro-ecc.a

52 Bytes
Binary file not shown.

esp32/bootloader/lib/libsoc.a

592 Bytes
Binary file not shown.

esp32/bootloader/lib/libspi_flash.a

72 Bytes
Binary file not shown.

esp32/ftp/updater.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -121,24 +121,9 @@ bool updater_start (void) {
121121

122122
bool updater_write (uint8_t *buf, uint32_t len) {
123123

124-
// the len has to be round-up to multiple of 16
125-
// so, actually up to 15Bytes(garbage) could be written to flash
126-
uint32_t len_aligned_16 = ((len + ENCRYP_FLASH_MIN_CHUNK - 1) / ENCRYP_FLASH_MIN_CHUNK) * ENCRYP_FLASH_MIN_CHUNK;
127-
// sl_LockObjLock (&wlan_LockObj, SL_OS_WAIT_FOREVER);
128-
129-
if (len != len_aligned_16) {
130-
ESP_LOGD(TAG, "Writing %d bytes, actually %d\n", len, len_aligned_16);
131-
}
132-
133-
// check if starting address is 16bytes aligned
134-
if (updater_data.offset % 16) {
135-
ESP_LOGE(TAG, "Start address, not 16 aligned, %X\n", updater_data.offset);
136-
return false;
137-
}
138-
139124
// the actual writing into flash, not-encrypted,
140125
// because it already came encrypted from OTA server
141-
if (ESP_OK != updater_spi_flash_write(updater_data.offset, (void *)buf, len_aligned_16, false)) {
126+
if (ESP_OK != updater_spi_flash_write(updater_data.offset, (void *)buf, len, false)) {
142127
ESP_LOGE(TAG, "SPI flash write failed\n");
143128
return false;
144129
}

esp32/hal/esp32_mphal.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,14 @@ IRAM_ATTR uint32_t mp_hal_ticks_us(void) {
173173
return now.tv_sec * 1000000 + now.tv_usec;
174174
}
175175

176+
IRAM_ATTR uint64_t mp_hal_ticks_ms_non_blocking(void) {
177+
return esp_timer_get_time() / 1000;
178+
}
179+
180+
IRAM_ATTR uint64_t mp_hal_ticks_us_non_blocking(void) {
181+
return esp_timer_get_time();
182+
}
183+
176184
void mp_hal_delay_ms(uint32_t delay) {
177185
MP_THREAD_GIL_EXIT();
178186
vTaskDelay (delay / portTICK_PERIOD_MS);

esp32/hal/esp32_mphal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ void mp_hal_stdout_tx_strn_cooked(const char *str, uint32_t len);
2323
uint32_t mp_hal_ticks_s(void);
2424
uint32_t mp_hal_ticks_ms(void);
2525
uint32_t mp_hal_ticks_us(void);
26+
uint64_t mp_hal_ticks_ms_non_blocking(void);
27+
uint64_t mp_hal_ticks_us_non_blocking(void);
2628
void mp_hal_delay_ms(uint32_t delay);
2729
void mp_hal_set_interrupt_char(int c);
2830
void mp_hal_reset_safe_and_boot(bool reset);

0 commit comments

Comments
 (0)
0