File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
targets/TARGET_Samsung/TARGET_SIDK_S1SBP6A Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ void serial_baud(serial_t *obj, int baudrate)
139
139
struct serial_s * objs = serial_s (obj );
140
140
float fFrac = 0 ;
141
141
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 );
143
143
144
144
fDiv = ((float )Peri_Clock / ((float )baudrate * 16 )) - (float )1.0 ;
145
145
fFrac = (uint32_t )((fDiv - (int32_t )fDiv ) * 16.0f );
@@ -215,7 +215,7 @@ void uart1_irq(void)
215
215
216
216
void uart2_irq (void )
217
217
{
218
- uint32_t uints = getreg32 (BP_UART0_BASE + UART_UINTP_OFFSET );
218
+ uint32_t uints = getreg32 (BP_UART2_BASE + UART_UINTP_OFFSET );
219
219
220
220
if (uints & UART_UINTS_RXD_MASK ) {
221
221
_uart_irq_handler (RxIrq , 2 );
You can’t perform that action at this time.
0 commit comments