Merge pull request #13674 from heuisam/dev_bp6a

Samsung: uart fixes
pull/13817/head
Martin Kojtal 2020-09-29 16:27:58 +01:00 committed by GitHub
commit 73b7e450e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 14 deletions

View File

@ -66,17 +66,17 @@ typedef enum {
#define _UART_NAME(a, b) _UART_NAME_(a, b)
#ifndef UART_STDIO_PORT
#define STDIO_UART_TX UART_TX0
#define STDIO_UART_RX UART_RX0
#define STDIO_UART UART_0
#define STDIO_UART_TX UART2_TX
#define STDIO_UART_RX UART2_RX
#define STDIO_UART UART_2
#else
#define STDIO_UART_TX _UART_NAME(UART_TX, UART_STDIO_PORT)
#define STDIO_UART_RX _UART_NAME(UART_RX, UART_STDIO_PORT)
#define STDIO_UART _UART_NAME(UART_, UART_STDIO_PORT)
#endif
#define USBTX UART_TX0
#define USBRX UART_RX0
#define USBTX UART2_TX
#define USBRX UART2_RX
#ifdef __cplusplus
}

View File

@ -107,8 +107,6 @@ typedef enum {
ECG_INP,
ECG_INN,
UART_TX0 = GPIO24,
UART_RX0 = GPIO25,
AN0 = GPA0_INP,
AN1 = GPA1_INP,
AN2 = GPA24_INP0,

View File

@ -37,7 +37,7 @@
#endif
#if !defined(MBED_ROM_SIZE)
#define MBED_ROM_SIZE 0x200000 // 2MB KB
#define MBED_ROM_SIZE 0x200000 // 2 MB
#endif
#if !defined(MBED_RAM_START)
@ -52,7 +52,7 @@
#define MBED_APP_START 0x00000000
#endif
#if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE 0x0080000 //512K
#define MBED_APP_SIZE 0x0080000 //512KB
#endif
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)

View File

@ -45,7 +45,7 @@
#endif
#if !defined(MBED_ROM_SIZE)
#define MBED_ROM_SIZE 0x200000 // 2MB KB
#define MBED_ROM_SIZE 0x200000 // 2MB
#endif
#if !defined(MBED_RAM_START)
@ -53,7 +53,7 @@
#endif
#if !defined(MBED_RAM_SIZE)
#define MBED_RAM_SIZE 0x40000 // 256 KB
#define MBED_RAM_SIZE 0x40000 // 25KB
#endif
#if !defined(MBED_APP_START)

View File

@ -37,7 +37,7 @@ static void peripheral_init(void)
{
/*AFE Voltage Config */
putreg32(&BP_AFE_TOP->REF_CTRL, 0x7A68201F);
putreg32(&BP_AFE_TOP->AFE_CLK_CTRL, 0x0);
putreg32(&BP_AFE_TOP->AFE_CLK_CTRL, 0x08);
}
void SystemCoreClockUpdate(void) /* Get Core Clock Frequency */

View File

@ -139,7 +139,7 @@ void serial_baud(serial_t *obj, int baudrate)
struct serial_s *objs = serial_s(obj);
float fFrac = 0;
float fDiv = 0;
uint32_t Peri_Clock = bp6a_cmu_get_clock_freq(CMU_UART0_CLK);
uint32_t Peri_Clock = bp6a_cmu_get_clock_freq(CMU_UART0_CLK + obj->index);
fDiv = ((float)Peri_Clock / ((float)baudrate * 16)) - (float)1.0;
fFrac = (uint32_t)((fDiv - (int32_t)fDiv) * 16.0f);
@ -215,7 +215,7 @@ void uart1_irq(void)
void uart2_irq(void)
{
uint32_t uints = getreg32(BP_UART0_BASE + UART_UINTP_OFFSET);
uint32_t uints = getreg32(BP_UART2_BASE + UART_UINTP_OFFSET);
if (uints & UART_UINTS_RXD_MASK) {
_uart_irq_handler(RxIrq, 2);