Skip to content

Commit a745525

Browse files
authored
Merge pull request #12342 from fkjagodzinski/fix-nxp-hal_fpga
LPC55S69: Fix UART & GPIO HAL to pass FPGA CI test shield tests
2 parents d3078a3 + a0ff95b commit a745525

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC/serial_api.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* mbed Microcontroller Library
2-
* Copyright (c) 2006-2013 ARM Limited
2+
* Copyright (c) 2006-2020 ARM Limited
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -189,10 +189,10 @@ void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_b
189189
static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_not_empty, uint32_t index)
190190
{
191191
if (serial_irq_ids[index] != 0) {
192-
if (transmit_empty)
192+
if (transmit_empty && (uart_addrs[index]->FIFOINTENSET & kUSART_TxLevelInterruptEnable))
193193
irq_handler(serial_irq_ids[index], TxIrq);
194194

195-
if (receive_not_empty)
195+
if (receive_not_empty && (uart_addrs[index]->FIFOINTENSET & kUSART_RxLevelInterruptEnable))
196196
irq_handler(serial_irq_ids[index], RxIrq);
197197
}
198198
}

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC55S69/TARGET_LPCXpresso/PeripheralPins.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,24 @@
1616

1717
#include "PeripheralPins.h"
1818
#include "PeripheralPinMaps.h"
19+
20+
// List of GPIOs with limited functionality
21+
const PinList *pinmap_gpio_restricted_pins()
22+
{
23+
static const PinName pins[] = {
24+
A4, // fixed pull-up (for I2C)
25+
A5, // fixed pull-up (for I2C)
26+
D5, // fixed pull-up (for LED)
27+
D3, // fixed pull-up (for LED)
28+
D4, // fixed pull-up (for LED)
29+
D7, // fixed pull-up
30+
D15, // fixed pull-up (for I2C)
31+
D14 // fixed pull-up (for I2C)
32+
};
33+
34+
static const PinList pin_list = {
35+
sizeof(pins) / sizeof(pins[0]),
36+
pins
37+
};
38+
return &pin_list;
39+
}

0 commit comments

Comments
 (0)