Skip to content

Commit 73b7e45

Browse files
authored
Merge pull request ARMmbed#13674 from heuisam/dev_bp6a
Samsung: uart fixes
2 parents 05babec + 6ff504a commit 73b7e45

File tree

6 files changed

+12
-14
lines changed

6 files changed

+12
-14
lines changed

targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/PeripheralNames.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,17 @@ typedef enum {
6666
#define _UART_NAME(a, b) _UART_NAME_(a, b)
6767

6868
#ifndef UART_STDIO_PORT
69-
#define STDIO_UART_TX UART_TX0
70-
#define STDIO_UART_RX UART_RX0
71-
#define STDIO_UART UART_0
69+
#define STDIO_UART_TX UART2_TX
70+
#define STDIO_UART_RX UART2_RX
71+
#define STDIO_UART UART_2
7272
#else
7373
#define STDIO_UART_TX _UART_NAME(UART_TX, UART_STDIO_PORT)
7474
#define STDIO_UART_RX _UART_NAME(UART_RX, UART_STDIO_PORT)
7575
#define STDIO_UART _UART_NAME(UART_, UART_STDIO_PORT)
7676
#endif
7777

78-
#define USBTX UART_TX0
79-
#define USBRX UART_RX0
78+
#define USBTX UART2_TX
79+
#define USBRX UART2_RX
8080

8181
#ifdef __cplusplus
8282
}

targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/PinNames.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ typedef enum {
107107
ECG_INP,
108108
ECG_INN,
109109

110-
UART_TX0 = GPIO24,
111-
UART_RX0 = GPIO25,
112110
AN0 = GPA0_INP,
113111
AN1 = GPA1_INP,
114112
AN2 = GPA24_INP0,

targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/device/TOOLCHAIN_ARM_STD/s1sbp6a.sct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#endif
3838

3939
#if !defined(MBED_ROM_SIZE)
40-
#define MBED_ROM_SIZE 0x200000 // 2MB KB
40+
#define MBED_ROM_SIZE 0x200000 // 2 MB
4141
#endif
4242

4343
#if !defined(MBED_RAM_START)
@@ -52,7 +52,7 @@
5252
#define MBED_APP_START 0x00000000
5353
#endif
5454
#if !defined(MBED_APP_SIZE)
55-
#define MBED_APP_SIZE 0x0080000 //512K
55+
#define MBED_APP_SIZE 0x0080000 //512KB
5656
#endif
5757

5858
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)

targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/device/memory_zones.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@
4545
#endif
4646

4747
#if !defined(MBED_ROM_SIZE)
48-
#define MBED_ROM_SIZE 0x200000 // 2MB KB
48+
#define MBED_ROM_SIZE 0x200000 // 2MB
4949
#endif
5050

5151
#if !defined(MBED_RAM_START)
5252
#define MBED_RAM_START 0x20000000
5353
#endif
5454

5555
#if !defined(MBED_RAM_SIZE)
56-
#define MBED_RAM_SIZE 0x40000 // 256 KB
56+
#define MBED_RAM_SIZE 0x40000 // 25KB
5757
#endif
5858

5959
#if !defined(MBED_APP_START)

targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/device/system_s1sbp6a.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static void peripheral_init(void)
3737
{
3838
/*AFE Voltage Config */
3939
putreg32(&BP_AFE_TOP->REF_CTRL, 0x7A68201F);
40-
putreg32(&BP_AFE_TOP->AFE_CLK_CTRL, 0x0);
40+
putreg32(&BP_AFE_TOP->AFE_CLK_CTRL, 0x08);
4141
}
4242

4343
void SystemCoreClockUpdate(void) /* Get Core Clock Frequency */

targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A/serial_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void serial_baud(serial_t *obj, int baudrate)
139139
struct serial_s *objs = serial_s(obj);
140140
float fFrac = 0;
141141
float fDiv = 0;
142-
uint32_t Peri_Clock = bp6a_cmu_get_clock_freq(CMU_UART0_CLK);
142+
uint32_t Peri_Clock = bp6a_cmu_get_clock_freq(CMU_UART0_CLK + obj->index);
143143

144144
fDiv = ((float)Peri_Clock / ((float)baudrate * 16)) - (float)1.0;
145145
fFrac = (uint32_t)((fDiv - (int32_t)fDiv) * 16.0f);
@@ -215,7 +215,7 @@ void uart1_irq(void)
215215

216216
void uart2_irq(void)
217217
{
218-
uint32_t uints = getreg32(BP_UART0_BASE + UART_UINTP_OFFSET);
218+
uint32_t uints = getreg32(BP_UART2_BASE + UART_UINTP_OFFSET);
219219

220220
if (uints & UART_UINTS_RXD_MASK) {
221221
_uart_irq_handler(RxIrq, 2);

0 commit comments

Comments
 (0)