Skip to content

Commit 4505276

Browse files
committed
NANO 33 IoT: remove references to R0
1 parent 76416c0 commit 4505276

File tree

4 files changed

+6
-19
lines changed

4 files changed

+6
-19
lines changed

boards.txt

+1-7
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ nano_33_iot.build.usb_product="Arduino NANO 33 IoT"
211211
nano_33_iot.build.usb_manufacturer="Arduino LLC"
212212
nano_33_iot.build.board=SAMD_NANO_33_IOT
213213
nano_33_iot.build.core=arduino
214-
nano_33_iot.build.extra_flags=-DCRYSTALLESS -D__SAMD21G18A__ {build.usb_flags} {build.tx_rx_swap}
214+
nano_33_iot.build.extra_flags=-DCRYSTALLESS -D__SAMD21G18A__ {build.usb_flags}
215215
nano_33_iot.build.ldscript=linker_scripts/gcc/flash_with_bootloader.ld
216216
nano_33_iot.build.openocdscript=openocd_scripts/arduino_zero.cfg
217217
nano_33_iot.build.variant=nano_33_iot
@@ -220,12 +220,6 @@ nano_33_iot.build.pid=0x8057
220220
nano_33_iot.bootloader.tool=openocd
221221
nano_33_iot.bootloader.file=nano_33_iot/samd21_sam_ba_arduino_nano_33_iot.bin
222222

223-
menu.r0_tx_rx_bug=TX RX swapped
224-
nano_33_iot.menu.r0_tx_rx_bug.no=No
225-
nano_33_iot.menu.r0_tx_rx_bug.no.build.tx_rx_swap=
226-
nano_33_iot.menu.r0_tx_rx_bug.yes=Yes
227-
nano_33_iot.menu.r0_tx_rx_bug.yes.build.tx_rx_swap=-DTX_RX_NINA_SWAPPED_R0
228-
229223
# Arduino MKR FOX 1200
230224
# --------------------
231225
mkrfox1200.name=Arduino MKR FOX 1200

cores/arduino/USB/samd21_host.c

+2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ void UHD_Init(void)
143143
uhd_state = UHD_STATE_NO_VBUS;
144144

145145
// Put VBUS on USB port
146+
#ifdef PIN_USB_HOST_ENABLE
146147
pinMode( PIN_USB_HOST_ENABLE, OUTPUT );
147148
digitalWrite( PIN_USB_HOST_ENABLE, HIGH );
149+
#endif
148150

149151
uhd_enable_connection_int();
150152

variants/nano_33_iot/variant.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ const PinDescription g_APinDescription[]=
162162
| 24 | | PA14 | NINA_CS | 14 | | | | | 2/02 | 4/02 | TC3/0 | TCC0/4 | | GCLK_IO0 |
163163
| 25 | | PA15 | NINA_SCK | 15 | | | | | *2/03 | 4/03 | TC3/1 | TCC0/5 | | GCLK_IO1 |
164164
| 26 | | PA27 | NINA_GPIO0 | *15 | | | | | | | | | | GCLK_IO0 |
165-
| 27 | | PB08 | NINA_RESETN | 08 | 02 | | Y14 | | | 4/00 | TC4/0 | | | |
165+
| 27 | | PA08 | NINA_RESETN | 08 | 02 | | Y14 | | | 4/00 | TC4/0 | | | |
166166
| 28 | | PA28 | NINA_ACK | 01 | | | | | | 1/01 | TCC2/1 | | | |
167167
+------------+------------------+--------+-----------------+--------+-----+-----+-----+-----+---------+---------+--------+--------+----------+----------+
168168
*/

variants/nano_33_iot/variant.h

+2-11
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,8 @@ static const uint8_t SCL = PIN_WIRE_SCL;
158158

159159
// USB
160160
// ---
161-
#define PIN_USB_HOST_ENABLE (0xFF)
162-
#define PIN_USB_DM (29ul)
163-
#define PIN_USB_DP (30ul)
161+
#define PIN_USB_DM (31ul)
162+
#define PIN_USB_DP (32ul)
164163

165164
// I2S Interfaces
166165
// --------------
@@ -189,18 +188,10 @@ extern Uart Serial1;
189188

190189
// Serial1
191190
extern Uart Serial2;
192-
#ifdef TX_RX_NINA_SWAPPED_R0
193-
// bug in R0, use MixedSerial(Serial2, 30) as SerialNina - 115200bps max
194-
#define PIN_SERIAL2_RX (29ul)
195-
#define PIN_SERIAL2_TX (30ul)
196-
#define PAD_SERIAL2_TX (UART_TX_PAD_2)
197-
#define PAD_SERIAL2_RX (SERCOM_RX_PAD_0)
198-
#else
199191
#define PIN_SERIAL2_RX (30ul)
200192
#define PIN_SERIAL2_TX (29ul)
201193
#define PAD_SERIAL2_TX (UART_TX_PAD_0)
202194
#define PAD_SERIAL2_RX (SERCOM_RX_PAD_1)
203-
#endif
204195

205196
extern Uart SerialHCI;
206197
#define PIN_SERIALHCI_RX (23ul)

0 commit comments

Comments
 (0)