File tree Expand file tree Collapse file tree 6 files changed +27
-51
lines changed
targets/TARGET_RENESAS/TARGET_RZ_A1XX Expand file tree Collapse file tree 6 files changed +27
-51
lines changed Original file line number Diff line number Diff line change 26
26
27
27
#include "os_tick.h"
28
28
#include "irq_ctrl.h"
29
-
30
- #include <MBRZA1LU.h>
31
-
32
- #include <cmsis.h>
29
+ #include "cmsis.h"
33
30
#include "mbed_drv_cfg.h"
34
31
35
32
@@ -145,7 +142,8 @@ void OS_Tick_Enable (void)
145
142
}
146
143
147
144
/// Disable OS Tick.
148
- void OS_Tick_Disable (void ) {
145
+ void OS_Tick_Disable (void )
146
+ {
149
147
150
148
// Stop the OSTM counter
151
149
OSTM .OSTMnTT = 0x01U ;
@@ -157,7 +155,7 @@ void OS_Tick_Disable (void) {
157
155
}
158
156
159
157
// Acknowledge OS Tick IRQ.
160
- void OS_Tick_AcknowledgeIRQ (void )
158
+ void OS_Tick_AcknowledgeIRQ (void )
161
159
{
162
160
IRQ_ClearPending (OSTM_IRQn );
163
161
}
Original file line number Diff line number Diff line change 26
26
* limitations under the License.
27
27
*/
28
28
29
- #include < RZ_A1LU.h>
29
+ #include " RZ_A1LU.h"
30
30
#include "RZ_A1_Init.h"
31
31
#include "irq_ctrl.h"
32
32
#include "mbed_drv_cfg.h"
33
33
34
-
35
- #define CS2_SDRAM_MODE_16BIT_CAS2_BR_BW (*(volatile uint16_t*)0x3FFFD040)
36
- #define CS3_SDRAM_MODE_16BIT_CAS2_BR_BW (*(volatile uint16_t*)0x3FFFE040)
37
- #define GPIO_PORT0_BOOTMODE_BITMASK (0x000fu)
38
-
39
34
/*
40
35
Port 0 (P0) MD pin assignment
41
36
P0_0: MD_BOOT0
@@ -66,12 +61,11 @@ void SystemCoreClockUpdate (void)
66
61
if (ifc == 0x03U ) {
67
62
/* Division ratio is 1/3 */
68
63
freq = (freq / 3U );
69
- }
70
- else {
71
- if (ifc == 0x01U ) {
72
- /* Division ratio is 2/3 */
73
- freq = (freq * 2U ) / 3U ;
74
- }
64
+ } else if (ifc == 0x01U ) {
65
+ /* Division ratio is 2/3 */
66
+ freq = (freq * 2U ) / 3U ;
67
+ } else {
68
+ /* do nothing */
75
69
}
76
70
77
71
SystemCoreClock = freq ;
Original file line number Diff line number Diff line change 26
26
27
27
#include "os_tick.h"
28
28
#include "irq_ctrl.h"
29
-
30
- #include <MBRZA1H.h>
31
-
32
- #include <cmsis.h>
29
+ #include "cmsis.h"
33
30
#include "mbed_drv_cfg.h"
34
31
35
32
Original file line number Diff line number Diff line change 26
26
* limitations under the License.
27
27
*/
28
28
29
- #include < RZ_A1H.h>
29
+ #include " RZ_A1H.h"
30
30
#include "RZ_A1_Init.h"
31
31
#include "irq_ctrl.h"
32
32
#include "mbed_drv_cfg.h"
33
33
34
- #define CS2_SDRAM_MODE_16BIT_CAS2_BR_BW (*(volatile uint16_t*)0x3FFFD040)
35
- #define CS3_SDRAM_MODE_16BIT_CAS2_BR_BW (*(volatile uint16_t*)0x3FFFE040)
36
- #define GPIO_PORT0_BOOTMODE_BITMASK (0x000fu)
37
-
38
34
/*
39
35
Port 0 (P0) MD pin assignment
40
36
P0_0: MD_BOOT0
@@ -65,12 +61,11 @@ void SystemCoreClockUpdate (void)
65
61
if (ifc == 0x03U ) {
66
62
/* Division ratio is 1/3 */
67
63
freq = (freq / 3U );
68
- }
69
- else {
70
- if (ifc == 0x01U ) {
71
- /* Division ratio is 2/3 */
72
- freq = (freq * 2U ) / 3U ;
73
- }
64
+ } else if (ifc == 0x01U ) {
65
+ /* Division ratio is 2/3 */
66
+ freq = (freq * 2U ) / 3U ;
67
+ } else {
68
+ /* do nothing */
74
69
}
75
70
76
71
SystemCoreClock = freq ;
Original file line number Diff line number Diff line change 26
26
27
27
#include "os_tick.h"
28
28
#include "irq_ctrl.h"
29
-
30
- #include <VKRZA1H.h>
31
-
32
- #include <cmsis.h>
29
+ #include "cmsis.h"
33
30
#include "mbed_drv_cfg.h"
34
31
35
32
Original file line number Diff line number Diff line change 26
26
* limitations under the License.
27
27
*/
28
28
29
- #include < VK_RZ_A1H.h>
29
+ #include " VK_RZ_A1H.h"
30
30
#include "RZ_A1_Init.h"
31
31
#include "irq_ctrl.h"
32
32
#include "mbed_drv_cfg.h"
33
33
34
- #define CS2_SDRAM_MODE_16BIT_CAS2_BR_BW (*(volatile uint16_t*)0x3FFFD040)
35
- #define CS3_SDRAM_MODE_16BIT_CAS2_BR_BW (*(volatile uint16_t*)0x3FFFE040)
36
- #define GPIO_PORT0_BOOTMODE_BITMASK (0x000fu)
37
-
38
34
/*
39
35
Port 0 (P0) MD pin assignment
40
36
P0_0: MD_BOOT0
@@ -52,29 +48,28 @@ uint32_t SystemCoreClock = RENESAS_RZ_A1_SYS_CLK;
52
48
System Core Clock update function
53
49
*----------------------------------------------------------------------------*/
54
50
void SystemCoreClockUpdate (void )
55
- {
51
+ {
56
52
uint32_t freq ;
57
53
uint16_t ifc ;
58
54
59
55
freq = RENESAS_RZ_A1_SYS_CLK ;
60
56
61
57
/* Get CPG.FRQCR[IFC] bits */
62
58
ifc = (CPG .FRQCR >> 8U ) & 0x03U ;
63
-
59
+
64
60
/* Determine Divider 2 output clock */
65
61
if (ifc == 0x03U ) {
66
62
/* Division ratio is 1/3 */
67
63
freq = (freq / 3U );
64
+ } else if (ifc == 0x01U ) {
65
+ /* Division ratio is 2/3 */
66
+ freq = (freq * 2U ) / 3U ;
67
+ } else {
68
+ /* do nothing */
68
69
}
69
- else {
70
- if (ifc == 0x01U ) {
71
- /* Division ratio is 2/3 */
72
- freq = (freq * 2U ) / 3U ;
73
- }
74
- }
75
70
76
71
SystemCoreClock = freq ;
77
- }
72
+ }
78
73
79
74
/*----------------------------------------------------------------------------
80
75
IRQ Handler Register/Unregister
You can’t perform that action at this time.
0 commit comments