Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 97a0a74

Browse files
author
iwahdan88
committed
esp32/lora: Fix crash when pin ISR handler fires (i.e. LoRa TX done) during flash operation (i.e. ota_write() call) #278
1 parent ed0ac50 commit 97a0a74

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

esp32/lora/sx1272-board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Maintainer: Miguel Luis and Gregory Cristian
1414
*/
1515

1616
#include "board.h"
17+
#include "esp_attr.h"
1718

1819
#if defined(LOPY) || defined (FIPY)
1920

@@ -25,7 +26,7 @@ Maintainer: Miguel Luis and Gregory Cristian
2526
/*!
2627
* Radio driver structure initialization
2728
*/
28-
const struct Radio_s Radio =
29+
DRAM_ATTR const struct Radio_s Radio =
2930
{
3031
SX1272Init,
3132
SX1272GetStatus,

esp32/lora/sx1276-board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Maintainer: Miguel Luis and Gregory Cristian
1414
*/
1515

1616
#include "board.h"
17+
#include "esp_attr.h"
1718

1819
#if defined(LOPY4)
1920

@@ -24,7 +25,7 @@ Maintainer: Miguel Luis and Gregory Cristian
2425
/*!
2526
* Radio driver structure initialization
2627
*/
27-
const struct Radio_s Radio =
28+
DRAM_ATTR const struct Radio_s Radio =
2829
{
2930
SX1276Init,
3031
SX1276GetStatus,

lib/lora/mac/region/Region.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ bool RegionIsActive( LoRaMacRegion_t region )
629629
}
630630
}
631631

632-
PhyParam_t RegionGetPhyParam( LoRaMacRegion_t region, GetPhyParams_t* getPhy )
632+
IRAM_ATTR PhyParam_t RegionGetPhyParam( LoRaMacRegion_t region, GetPhyParams_t* getPhy )
633633
{
634634
PhyParam_t phyParam = { 0 };
635635
switch( region )

lib/lora/mac/region/RegionEU868.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static uint8_t CountNbOfEnabledChannels( bool joined, uint8_t datarate, uint16_t
184184
return nbEnabledChannels;
185185
}
186186

187-
PhyParam_t RegionEU868GetPhyParam( GetPhyParams_t* getPhy )
187+
IRAM_ATTR PhyParam_t RegionEU868GetPhyParam( GetPhyParams_t* getPhy )
188188
{
189189
PhyParam_t phyParam = { 0 };
190190

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy