-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NRF5] NVIC_SetVector functionality #2943
[NRF5] NVIC_SetVector functionality #2943
Conversation
error_t btle_init(void) | ||
{ | ||
nrf_clock_lf_cfg_t clockConfiguration; | ||
|
||
// register softdevice hanlder vector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: typo handler
@pan- Please review |
void SPIM2_SPIS2_SPI2_IRQHandler(void); | ||
|
||
static peripheral_hanlder_desc_t spi_hanlder_desc[SPI_COUNT] = { | ||
#if SPI0_ENABLED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: #if
should be at the beginning line, I see though that the rest in this file followed this one though
# Conflicts: # hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/serial_api.c # hal/targets/hal/TARGET_NORDIC/TARGET_NRF5/us_ticker.c
Reduce size of no-init section to precisely fit to size of vector in RAM.
…" includes from "target cmsis" sources move form the path target/cmsis... and rename dispatch_IRQn_handler.c to the path target/.. and beter name.
…1822 targets. Applied proper changes to ARM5's scatter files of nRF5 regular targets. Improvement: Remove hardcoding of FLASH vector address, now FLASH vector address is imported form linker to C code. Signed-off-by: Andrzej Puzdrowski <[email protected]>
Move to one IAR startup code for both varaint of RAM (16 KB & 32 KB).
void TIMER1_IRQHandler(void); | ||
void TIMER2_IRQHandler(void); | ||
|
||
static peripheral_hanlder_desc_t timer_handlers[] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
@@ -39,6 +39,7 @@ static const PinMap PinMap_ADC[] = { | |||
{NC, NC, 0} | |||
}; | |||
|
|||
void ADC_IRQHandler(void); // export IRQ handler form nrf_drv_adc.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo - from
void PWM1_IRQHandler(void); | ||
void PWM2_IRQHandler(void); | ||
|
||
static peripheral_hanlder_desc_t pwm_handlers[PWM_INSTANCE_COUNT] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
void SPI0_TWI0_IRQHandler(void); | ||
void SPI1_TWI1_IRQHandler(void); | ||
|
||
static peripheral_hanlder_desc_t twi_handlers[TWI_COUNT] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
void SPI1_TWI1_IRQHandler(void); | ||
void SPIM2_SPIS2_SPI2_IRQHandler(void); | ||
|
||
static peripheral_hanlder_desc_t spi_hanlder_desc[SPI_COUNT] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
{ | ||
IRQn_Type IRQn; | ||
uint32_t vector; | ||
} peripheral_hanlder_desc_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo - handler
DCD WDT_IRQHandler_v ;WDT | ||
DCD RTC1_IRQHandler_v ;RTC1 | ||
DCD QDEC_IRQHandler_v ;QDEC | ||
DCD LPCOMP_COMP_IRQHandler_v ;LPCOMP_COMP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be "LPCOMP_IRQHandler_v"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like it's artefact of a very old SDK.
8172c09
to
d585680
Compare
…y rebase). ad applied them to to regular targets. Fix a typo and polish nordic's code.
d585680
to
8302ce0
Compare
@nvlsianpu |
@0xc0170 It is good now. LGTM. |
@sg- Is it possible to launch the CI for this PR ? |
/morph test |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 0 Test failed! |
Test failure should be ok, looks like the test PC was under heavy load |
/morph test |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 0 All builds and test passed! |
Ports for Upcoming Targets Fixes and Changes 2966: Add kw24 support ARMmbed/mbed-os#2966 3068: MultiTech mDot - clean up PeripheralPins.c and add new pin names ARMmbed/mbed-os#3068 3089: Kinetis HAL: Remove clock initialization code from serial and ticker ARMmbed/mbed-os#3089 2943: [NRF5] NVIC_SetVector functionality ARMmbed/mbed-os#2943 2938: InterruptIn changes in NCS36510 HAL. ARMmbed/mbed-os#2938 3108: Fix sleep function for NRF52. ARMmbed/mbed-os#3108 3076: STM32F1: Correct timer master value reading ARMmbed/mbed-os#3076 3085: Add LOWPOWERTIMER capability for NUCLEO_F303ZE ARMmbed/mbed-os#3085 3046: [BEETLE] Update BLE stack on Beetle board ARMmbed/mbed-os#3046 3122: [Silicon Labs] Update of Silicon Labs HAL ARMmbed/mbed-os#3122 3022: OnSemi RAM usage fix ARMmbed/mbed-os#3022 3121: STM32F3: Correct UART4 and UART5 defines when using DEVICE_SERIAL_ASYNCH ARMmbed/mbed-os#3121 3142: Targets- NUMAKER_PFM_NUC47216 remove mbed 2 ARMmbed/mbed-os#3142
Move vector to RAM. Vector is moved thanks to the Softdevice API. Peripheral IRQn that were using are now register using NVIC_SetVector in hal's drivers constructors. This cause reducing amount of memory that was waist for unused handlers code and data. Changes touch nRF5 based targets (so not legacy targets).
Were cut unused ends of vector tables in FLASH which give improvement in FLASH footprint.