Skip to content

Commit 9220dc4

Browse files
author
Daniel Campora
committed
cc3200: Correct udelay us to ticks calculation.
1 parent d18ced9 commit 9220dc4

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

cc3200/bootmgr/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@
6464
#define BOOTMGR_HASH_SIZE 32
6565
#define BOOTMGR_BUFF_SIZE 512
6666

67-
#define BOOTMGR_WAIT_SAFE_MODE_MS 1200
68-
#define BOOTMGR_WAIT_SAFE_MODE_TOOGLE_MS 200
67+
#define BOOTMGR_WAIT_SAFE_MODE_MS 2400
68+
#define BOOTMGR_WAIT_SAFE_MODE_TOOGLE_MS 400
6969

70-
#define BOOTMGR_SAFE_MODE_ENTER_MS 800
71-
#define BOOTMGR_SAFE_MODE_ENTER_TOOGLE_MS 80
70+
#define BOOTMGR_SAFE_MODE_ENTER_MS 1600
71+
#define BOOTMGR_SAFE_MODE_ENTER_TOOGLE_MS 160
7272

7373
//*****************************************************************************
7474
// Exported functions declarations

cc3200/hal/cc3200_hal.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,7 @@ void HAL_Delay(uint32_t delay) {
123123
#endif
124124
} else {
125125
for (int ms = 0; ms < delay; ms++) {
126-
// 500 instead of 1000 us to compensate the overhead of the for loop
127-
// and the function call
128-
UtilsDelay(UTILS_DELAY_US_TO_COUNT(500));
126+
UtilsDelay(UTILS_DELAY_US_TO_COUNT(1000));
129127
}
130128
}
131129
}

cc3200/hal/cc3200_hal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#define HAL_FCPU_MHZ 80U
3838
#define HAL_FCPU_HZ (1000000U * HAL_FCPU_MHZ)
3939
#define HAL_SYSTICK_PERIOD_US 1000U
40-
#define UTILS_DELAY_US_TO_COUNT(us) (((us) * HAL_FCPU_MHZ) / 3)
40+
#define UTILS_DELAY_US_TO_COUNT(us) (((us) * HAL_FCPU_MHZ) / 6)
4141

4242
#define HAL_NVIC_INT_CTRL_REG (*((volatile uint32_t *) 0xE000ED04 ) )
4343
#define HAL_VECTACTIVE_MASK (0x1FUL)

0 commit comments

Comments
 (0)