Skip to content

Commit 0d72a40

Browse files
committed
Merge remote-tracking branch 'refs/remotes/mbedmicro/master' into DEV_FIX_1419_baudrateissue
2 parents 5765076 + 8c54034 commit 0d72a40

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/serial_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,14 +1693,14 @@ int serial_irq_handler_asynch(serial_t *obj)
16931693
}
16941694
}else{
16951695
if(obj->serial.periph.uart->IEN & USART_IEN_TXC){
1696-
USART_IntDisable(obj->serial.periph.leuart,USART_IEN_TXC);
1696+
USART_IntDisable(obj->serial.periph.uart,USART_IEN_TXC);
16971697
/* Clean up */
16981698
serial_dma_irq_fired[obj->serial.dmaOptionsTX.dmaChannel] = false;
16991699
serial_tx_abort_asynch(obj);
17001700
/* Notify CPP land of completion */
17011701
return SERIAL_EVENT_TX_COMPLETE & obj->serial.events;
17021702
}else{
1703-
USART_IntEnable(obj->serial.periph.leuart,USART_IEN_TXC);
1703+
USART_IntEnable(obj->serial.periph.uart,USART_IEN_TXC);
17041704
}
17051705
}
17061706
} else {

libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/sleep.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,7 @@ uint32_t sleep_block_counter[NUM_SLEEP_MODES] = {0};
4141

4242
/**
4343
* Sleep mode.
44-
* Enter Energy Mode 1, which turns off the clock to the CPU.
45-
*
46-
* In EM1, the CPU is sleeping and the power consumption is only 50 μA/MHz.
47-
* All peripherals, including DMA, PRS and memory system, are still available.
44+
* Enter the lowest possible sleep mode that is not blocked by ongoing activity.
4845
*/
4946
void sleep(void)
5047
{
@@ -57,13 +54,10 @@ void sleep(void)
5754
} else if (sleep_block_counter[2] > 0) {
5855
/* Blocked everything below EM2, enter EM2 */
5956
EMU_EnterEM2(true);
60-
} else if (sleep_block_counter[3] > 0) {
57+
} else {
6158
/* Blocked everything below EM3, enter EM3 */
6259
EMU_EnterEM3(true);
63-
} else{
64-
/* Nothing is blocked, enter EM4 */
65-
EMU_EnterEM4();
66-
}
60+
} /* Never enter EM4, as mbed has no way of configuring EM4 wakeup */
6761
return;
6862
}
6963

libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/spi_api.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
static uint16_t fill_word = SPI_FILL_WORD;
5151
#define SPI_LEAST_ACTIVE_SLEEPMODE EM1
5252

53-
inline CMU_Clock_TypeDef spi_get_clock_tree(spi_t *obj)
53+
static inline CMU_Clock_TypeDef spi_get_clock_tree(spi_t *obj)
5454
{
5555
switch ((int)obj->spi.spi) {
5656
#ifdef USART0
@@ -71,7 +71,7 @@ inline CMU_Clock_TypeDef spi_get_clock_tree(spi_t *obj)
7171
}
7272
}
7373

74-
inline uint8_t spi_get_index(spi_t *obj)
74+
static inline uint8_t spi_get_index(spi_t *obj)
7575
{
7676
uint8_t index = 0;
7777
switch ((int)obj->spi.spi) {
@@ -359,7 +359,6 @@ int spi_master_write(spi_t *obj, int value)
359359

360360
/* Wait for transmission of last byte */
361361
while (!(obj->spi.spi->STATUS & USART_STATUS_TXC)) {
362-
sleep(); // TODO_LP this might break other code, write should be separate from read?
363362
}
364363

365364
return spi_read(obj);

workspace_tools/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
395395
# Detect which lib should be added to test
396396
# Some libs have to compiled like RTOS or ETH
397397
for lib in LIBRARIES:
398-
if lib['build_dir'] in test.dependencies and lib['build_dir'] not in libraries:
398+
if lib['build_dir'] in test.dependencies and lib['id'] not in libraries:
399399
libraries.append(lib['id'])
400400

401401

0 commit comments

Comments
 (0)