Skip to content

Commit

Permalink
Added marco LSI_VALUE.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anol Paisal committed Feb 26, 2022
1 parent 6373346 commit 8d90c6c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
7 changes: 4 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@

// Target board, the following boards are supported:
// NAMote72, NucleoL073 (Default), NucleoL152, NucleoL476, SAMR34, SKiM880B, SKiM980A, SKiM881AXL, eMOD-iMS62F, B-L072Z-LRWAN1.
"BOARD":"eMOD-iMS62F",
"BOARD":"SKiM980A",

// MBED Radio shield selection. (Applies only to Nucleo platforms)
// The following shields are supported:
// SX1272MB2DAS, SX1276MB1LAS, SX1276MB1MAS, SX1261MBXBAS(Default), SX1262MBXCAS, SX1262MBXDAS, LR1110MB1XXS.
"MBED_RADIO_SHIELD":"SX1262MBXCAS",
"MBED_RADIO_SHIELD":"SX1272MB2DAS",

// Secure element type selection the following are supported
// SOFT_SE(Default), LR1110_SE, ATECC608A_TNGLORA_SE
Expand Down Expand Up @@ -86,6 +86,7 @@
"utilities.h": "c",
"se-identity.h": "c",
"githubversion.h": "c",
"commissioning.h": "c"
"commissioning.h": "c",
"stm32l1xx_hal_rcc.h": "c"
}
}
2 changes: 1 addition & 1 deletion src/apps/LoRaMac/common/Commissioning.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* When set to 1 the application uses the Over-the-Air activation procedure
* When set to 0 the application uses the Personalization activation procedure
*/
#define OVER_THE_AIR_ACTIVATION 0
#define OVER_THE_AIR_ACTIVATION 1

/*!
* When using ABP activation the MAC layer must know in advance to which server
Expand Down
2 changes: 1 addition & 1 deletion src/boards/SKiM980A/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ list(APPEND ${PROJECT_NAME}_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/../mcu/stm32/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rtc.c"
"${CMAKE_CURRENT_SOURCE_DIR}/../mcu/stm32/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_rtc_ex.c"
"${CMAKE_CURRENT_SOURCE_DIR}/../mcu/stm32/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_spi.c"
"${CMAKE_CURRENT_SOURCE_DIR}/../mcu/stm32/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_spi_ex.c"
#"${CMAKE_CURRENT_SOURCE_DIR}/../mcu/stm32/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_spi_ex.c"
"${CMAKE_CURRENT_SOURCE_DIR}/../mcu/stm32/STM32L1xx_HAL_Driver/Src/stm32l1xx_hal_uart.c"
)

Expand Down
14 changes: 7 additions & 7 deletions src/boards/SKiM980A/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,12 @@ uint8_t BoardGetBatteryLevel( void )

BatteryVoltage = BoardBatteryMeasureVoltage( );

if( GetBoardPowerSource( ) == USB_POWER )
{
batteryLevel = 0;
}
else
{
// if( GetBoardPowerSource( ) == USB_POWER )
// {
// batteryLevel = 0;
// }
// else
// {
if( BatteryVoltage >= BATTERY_MAX_LEVEL )
{
batteryLevel = 254;
Expand All @@ -341,7 +341,7 @@ uint8_t BoardGetBatteryLevel( void )
{
batteryLevel = 255;
}
}
// }
return batteryLevel;
}

Expand Down
9 changes: 9 additions & 0 deletions src/boards/SKiM980A/cmsis/stm32l1xx_hal_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@
#define HSI_VALUE ((uint32_t)16000000) /*!< Value of the Internal oscillator in Hz*/
#endif /* HSI_VALUE */

/**
* @brief Internal Low Speed oscillator (LSI) value.
*/
#if !defined (LSI_VALUE)
#define LSI_VALUE (37000U) /*!< LSI Typical Value in Hz*/
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
The real value may vary depending on the variations
in voltage and temperature.*/

/**
* @brief External Low Speed oscillator (LSE) value.
* This value is used by the UART, RTC HAL module to compute the system frequency
Expand Down

0 comments on commit 8d90c6c

Please sign in to comment.