File tree Expand file tree Collapse file tree 4 files changed +32
-31
lines changed
targets/TARGET_RENESAS/TARGET_RZ_A1XX Expand file tree Collapse file tree 4 files changed +32
-31
lines changed Original file line number Diff line number Diff line change 22
22
* limitations under the License.
23
23
*/
24
24
25
- #ifdef MBED_CONF_RTOS_PRESENT
26
-
27
- #include "os_tick.h"
28
25
#include "irq_ctrl.h"
29
26
#include "cmsis.h"
30
27
#include "mbed_drv_cfg.h"
31
28
29
+ // Define OS Timer channel and interrupt number
30
+ #define OSTM (OSTM0)
31
+ #define OSTM_IRQn ((IRQn_ID_t)OSTMI0TINT_IRQn)
32
+
33
+ #ifdef MBED_CONF_RTOS_PRESENT
34
+ #include "os_tick.h"
32
35
33
36
// Define OS TImer interrupt priority
34
37
#ifndef OSTM_IRQ_PRIORITY
35
38
#define OSTM_IRQ_PRIORITY 0xFFU
36
39
#endif
37
40
38
- // Define OS Timer channel and interrupt number
39
- #define OSTM (OSTM0)
40
- #define OSTM_IRQn ((IRQn_ID_t)OSTMI0TINT_IRQn)
41
-
42
-
43
41
static uint32_t OSTM_Clock ; // Timer tick frequency
44
42
static uint8_t OSTM_PendIRQ ; // Timer interrupt pending flag
45
43
46
-
47
44
// Setup OS Tick.
48
45
int32_t OS_Tick_Setup (uint32_t freq , IRQHandler_t handler )
49
46
{
@@ -190,10 +187,10 @@ uint32_t OS_Tick_GetOverflow (void)
190
187
{
191
188
return (IRQ_GetPending (OSTM_IRQn ));
192
189
}
190
+ #endif
193
191
194
192
// Get Cortex-A9 OS Timer interrupt number
195
193
IRQn_ID_t mbed_get_a9_tick_irqn (){
196
194
return OSTM_IRQn ;
197
195
}
198
- #endif
199
196
Original file line number Diff line number Diff line change 22
22
* limitations under the License.
23
23
*/
24
24
25
- #ifdef MBED_CONF_RTOS_PRESENT
26
-
27
- #include "os_tick.h"
28
25
#include "irq_ctrl.h"
29
26
#include "cmsis.h"
30
27
#include "mbed_drv_cfg.h"
31
28
29
+ // Define OS Timer channel and interrupt number
30
+ #define OSTM (OSTM0)
31
+ #define OSTM_IRQn ((IRQn_ID_t)OSTMI0TINT_IRQn)
32
+
33
+ #ifdef MBED_CONF_RTOS_PRESENT
34
+ #include "os_tick.h"
32
35
33
36
// Define OS TImer interrupt priority
34
37
#ifndef OSTM_IRQ_PRIORITY
35
38
#define OSTM_IRQ_PRIORITY 0xFFU
36
39
#endif
37
40
38
- // Define OS Timer channel and interrupt number
39
- #define OSTM (OSTM0)
40
- #define OSTM_IRQn ((IRQn_ID_t)OSTMI0TINT_IRQn)
41
-
42
-
43
41
static uint32_t OSTM_Clock ; // Timer tick frequency
44
42
static uint8_t OSTM_PendIRQ ; // Timer interrupt pending flag
45
43
46
-
47
44
// Setup OS Tick.
48
45
int32_t OS_Tick_Setup (uint32_t freq , IRQHandler_t handler )
49
46
{
@@ -190,10 +187,10 @@ uint32_t OS_Tick_GetOverflow (void)
190
187
{
191
188
return (IRQ_GetPending (OSTM_IRQn ));
192
189
}
190
+ #endif
193
191
194
192
// Get Cortex-A9 OS Timer interrupt number
195
193
IRQn_ID_t mbed_get_a9_tick_irqn (){
196
194
return OSTM_IRQn ;
197
195
}
198
- #endif
199
196
Original file line number Diff line number Diff line change 22
22
* limitations under the License.
23
23
*/
24
24
25
- #ifdef MBED_CONF_RTOS_PRESENT
26
-
27
- #include "os_tick.h"
28
25
#include "irq_ctrl.h"
29
26
#include "cmsis.h"
30
27
#include "mbed_drv_cfg.h"
31
28
29
+ // Define OS Timer channel and interrupt number
30
+ #define OSTM (OSTM0)
31
+ #define OSTM_IRQn ((IRQn_ID_t)OSTMI0TINT_IRQn)
32
+
33
+ #ifdef MBED_CONF_RTOS_PRESENT
34
+ #include "os_tick.h"
32
35
33
36
// Define OS TImer interrupt priority
34
37
#ifndef OSTM_IRQ_PRIORITY
35
38
#define OSTM_IRQ_PRIORITY 0xFFU
36
39
#endif
37
40
38
- // Define OS Timer channel and interrupt number
39
- #define OSTM (OSTM0)
40
- #define OSTM_IRQn ((IRQn_ID_t)OSTMI0TINT_IRQn)
41
-
42
-
43
41
static uint32_t OSTM_Clock ; // Timer tick frequency
44
42
static uint8_t OSTM_PendIRQ ; // Timer interrupt pending flag
45
43
46
-
47
44
// Setup OS Tick.
48
45
int32_t OS_Tick_Setup (uint32_t freq , IRQHandler_t handler )
49
46
{
@@ -190,11 +187,10 @@ uint32_t OS_Tick_GetOverflow (void)
190
187
{
191
188
return (IRQ_GetPending (OSTM_IRQn ));
192
189
}
190
+ #endif
193
191
194
192
// Get Cortex-A9 OS Timer interrupt number
195
193
IRQn_ID_t mbed_get_a9_tick_irqn (){
196
194
return OSTM_IRQn ;
197
195
}
198
196
199
- #endif
200
-
Original file line number Diff line number Diff line change @@ -128,6 +128,17 @@ void hal_deepsleep(void) {
128
128
wk_CPGSTBCR13 = CPGSTBCR13 ;
129
129
#endif
130
130
131
+ /* Waits for the serial transmission to complete */
132
+ const struct st_scif * SCIF [SCIF_COUNT ] = SCIF_ADDRESS_LIST ;
133
+
134
+ for (int uart = 0 ; uart < SCIF_COUNT ; uart ++ ) {
135
+ if ((wk_CPGSTBCR4 & (1 << (7 - uart ))) == 0 ) { // Is the power turned on?
136
+ if ((SCIF [uart ]-> SCSCR & 0x00A0 ) == 0x00A0 ) { // Is transmission enabled? (TE = 1, TIE = 1)
137
+ while ((SCIF [uart ]-> SCFSR & 0x0040 ) == 0 ); // Waits for the transmission to complete (TEND = 1)
138
+ }
139
+ }
140
+ }
141
+
131
142
/* MTU2 (for low power ticker) */
132
143
CPGSTBCR3 |= ~(CPG_STBCR3_BIT_MSTP33 );
133
144
dummy_8 = CPGSTBCR3 ;
You can’t perform that action at this time.
0 commit comments