Commit graph

889 commits

Author SHA1 Message Date
hathach
13e3e6ea00
change default debug_script to cmsis-dap 2023-06-26 15:53:56 +07:00
Earle F. Philhower, III
9e89dda900
Ensure 64bit math for SD card FSInfo (#1553)
Fixes #1552

Ensure that 64 bit multiplication is done when calculating the total size
available and used for SDFS.
2023-06-23 08:25:36 -07:00
Tristan Rowley
91e69e2a1a
Add Pimoroni Plasma RP2040 support (#1556) 2023-06-22 12:58:57 -07:00
Mohammed Chamma
21d1a285dc
Fix typo in fs.rst regarding info64 (#1551) 2023-06-20 13:00:36 -07:00
LinusHeu
0e579792d1
I2S: Don't consider _isHolding when it's an output (#1548) 2023-06-19 07:54:34 -07:00
Earle F. Philhower, III
20cabe824f Update version 2023-06-17 19:40:40 -07:00
Earle F. Philhower, III
0847d3dbb0
Update to Pico-SDK 1.5.1 (#1539)
This should reduce the `git submodule update` space required as well as
avoid the max-path-len errors under Windows in most cases.
2023-06-15 17:05:04 -07:00
Paint Your Dragon
fa7c287f07
Linker tweaks for RAM-resident PicoDVI library functions (#1541) 2023-06-15 15:01:02 -07:00
hreintke
9b3032cd58
WebServer: Solve HTTP request delay by dropping idle connections (#1537)
Serve next wificlient (http_request) if current client does not have data
2023-06-15 07:39:02 -07:00
Earle F. Philhower, III
50646b9e70
Update httpclient.rst (#1538) 2023-06-15 07:20:15 -07:00
Earle F. Philhower, III
3d6a1c7b41
Enable proper reuse of PIO programs (#1526)
* Enable proper reuse of PIO programs

Rewrite the PIOProgram helper class to properly re-use loaded programs
and to try to re-use loaded instructions before allocating a new PIO
program.

Supersedes #1524

* Less copy-pasta
2023-06-13 04:42:37 -07:00
Earle F. Philhower, III
5b76b0668b
Addition ABM checks in PWMAudio and ADCInput (#1530)
Handle the case where the DMA manager is unable to completely allocate
needed resources (DMA channels or memory) and return `false` in ::begin()
2023-06-12 15:20:52 -07:00
Earle F. Philhower, III
d18f8dce2f
I2S check for failure of ARB and PIO allocation (#1528)
Per https://github.com/earlephilhower/arduino-pico/pull/1524#issuecomment-1587885054
2023-06-12 12:24:08 -07:00
Earle F. Philhower, III
c64cdc14b6
Call I2S::end() in I2S destructor (#1527)
Per https://github.com/earlephilhower/arduino-pico/pull/1524#issuecomment-1587562257
2023-06-12 12:12:50 -07:00
Earle F. Philhower, III
cc800713bd
Minor clean up includes (#1520) 2023-06-10 20:42:28 -07:00
Linar Yusupov
c6a0d6ecfe
Fix for invalid __channelCount in ~AudioBufferManager() (#1519) 2023-06-10 10:51:19 -07:00
Earle F. Philhower, III
c6426ae461
Update RP2040Support.h (#1518) 2023-06-09 07:59:05 -07:00
Earle F. Philhower, III
7b04a033b3
Update rp2040.rst (#1515) 2023-06-08 09:49:57 -07:00
madias123
8e4008bf12
Add rebootToBootloader to reboot to bootloader from code (#1514) 2023-06-08 09:48:35 -07:00
Earle F. Philhower, III
7eb176c0b4 Update version 2023-06-07 18:06:55 -07:00
hreintke
3f475ac68c
CoreMutex add portYieldFromISR for FreeRTOS (#1484) 2023-06-07 06:59:10 -07:00
Earle F. Philhower, III
5204dab99b
Fix CoreMutex FreeRTOS ISR logic (#1510) 2023-06-07 00:15:41 -07:00
Earle F. Philhower, III
273fb84dc5
Update to Adafruit TinyUSB 2.2.1 (#1511)
Fixes #1509
2023-06-07 00:05:12 -07:00
LinusHeu
fe3af4d98b
Update i2s.rst + typo (#1504) 2023-06-05 13:10:04 -07:00
Earle F. Philhower, III
9aade5bb24
Update adc.rst (#1502) 2023-06-05 02:15:09 -07:00
Earle F. Philhower, III
3c408dab7c
AudioBufferManager(I2s, PWMAudio, ADCInput) clicking fix (#1500)
The ABM had an off-by-one error in the DMA buffer swapover.  Instead of
setting the DMA address to the newly added buffer in active[], it set it
to the buffer that was currently running.

This would effectively disable the ping-pong and cause clicks/lost data.

Fixes #1491
2023-06-04 18:40:29 -07:00
Earle F. Philhower, III
2888f4d03d
I2S::available/availableForWrite() returns bytes (#1499)
Per the Arduino documentation, I2s::available should return bytes free,
not samples.  Adjust accordingly.
2023-06-04 16:38:12 -07:00
Earle F. Philhower, III
f57b5bc762
Add I2S::getOverUnderflow() (#1497)
See #1491.  Thanks @LinusHeu
2023-06-04 14:21:02 -07:00
Earle F. Philhower, III
35a4d57360
Fix I2s::available/availableForWrite() (#1496)
Return the actual number of samples that can be read/written, not the
number of 32-bit values there is space for.
2023-06-04 14:10:53 -07:00
Earle F. Philhower, III
579e366bcf
Fix serial reset hang under FreeRTOS (#1495)
The serial port reset logic was calling `sleep_ms()` which ended up doing
a task switch...while the other core was frozen and everything was supposed
to be locked.

Use `busy_wait_ms()` which is a tight loop to delay in the reset portion.

Fixes #1486
2023-06-04 13:28:11 -07:00
hreintke
db4f79448d
CoreMutex freeRTOS Mutex acquire properly (#1481)
Since FreeRTOS has real tasks and mutexes with support for priority bumping, actually always try and take a `CoreMutex` instead of seeing if someone else already has it and aborting immediately.

This fix helps ensure things like Serial output in a multi-task system won't get lost.
2023-06-04 13:12:30 -07:00
LinusHeu
45bbcca207
AudioBufferManager: Make dma_claim_unused_channel() not panic (#1487) 2023-05-30 15:51:07 -07:00
Dominic Pearman
8e961a5667
Added setup overload to pass name. (#1483)
Co-authored-by: Dominic Pearman <dominic@phymorous.de>
2023-05-27 10:40:24 -07:00
Ivan Kravets
64ad69c247
Temporary disable publishing to the PIO registry (#1476)
See RPI's CEO comment https://github.com/platformio/platform-raspberrypi/pull/36#issuecomment-1560504425
2023-05-26 10:24:28 -07:00
Jan
4def2f219c
Implement the BD_ADDR(char * address_string) constructor. (#1440)
* Implement the BD_ADDR(char * address_string) constructor.

* Updating implementation to use sscanf.

There is an extra step after the sscanf that checks that we got
six bytes back and if we did not, it will set all bytes in the
address to zero.

* Example using BD_ADDR(const char * address_string)

This example shows how BD_ADDR(const char * address_string) can
be used to create BD_ADDR objects to use for comparisons etc.

* Update LEDeviceScanner.ino formatting
2023-05-25 06:54:24 -07:00
Earle F. Philhower, III
b2b4b2d71d Update version 2023-05-23 17:57:38 -07:00
Earle F. Philhower, III
e93bd14ef5
Generate warnings if Pico STDIO init called (#1467)
Warn the user that the Pico SDK STDIO calls (stdio_init_all, stdio_usb_init,
stdio_uart_init) are not supported or needed at compile time.  See multiple
issues #1433 #1347 #1273 #1251 and others.
2023-05-23 17:28:57 -07:00
Earle F. Philhower, III
652f9f9eda
Fix FreeRTOS CoreMutex shim to handle ISRs (#1442)
* Fix FreeRTOS CoreMutex shim to handle ISRs

Automatically check, when in FreeRTOS, if we're in an ISR and
if so call the correct mutex grab.

Thanks to @caveman99 for finding and proposing a solution!

Fixes #1441

* Fix the CoreMutex destructor, too
2023-05-23 10:12:52 -07:00
Earle F. Philhower, III
cac9eb0cd7
BREAKING: Swap Wire1 and Wire in Adafruit Feather (#1468)
Fixes #1465

The Adafruit Feather came onboard before the Wire swapping was supported
in the core, so it's backwards from the real definition.  Now that swapping is
supported, fix it to match the rest of the boards.
2023-05-23 09:57:28 -07:00
LinusHeu
3b4fb295ea
Fix I2S::write(const uint8_t *buffer, size_t size) (#1461)
According to this: https://github.com/earlephilhower/arduino-pico/discussions/1450
2023-05-20 11:33:50 -07:00
Jean-Luc Béchennec
a1ae61b5b1
BT Serial connection docs for Mac (#1459) 2023-05-20 10:56:06 -07:00
Mykle
355abd8c57
Add setInverted() options to SerialPIO (#1451)
Call `SerialPIO::setInverted(txinv, rxinv)` before `SerialPIO::begin()` to enable.

---------

Co-authored-by: Mykle Hansen <mykle@mykle.com>
Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
2023-05-19 16:30:26 -07:00
Earle F. Philhower, III
b57ac66815
Cleanup legacy includes (#1452) 2023-05-16 23:47:17 -07:00
Earle F. Philhower, III
a851a928d2
Merge latest FreeRTOS/SMP upstream branch (#1449)
Update to head of upstream FreeRTOS/SMP branch.  Very minor changes.

Remove the custom getreent implementation, use the one that was defined
in the upstream FreeRTOS/smp branch (callback related vs. static vars).
2023-05-16 12:13:51 -07:00
Earle F. Philhower, III
16c2e8e454
Clean up FreeRTOS, remove core freeze hacks (#1448) 2023-05-15 19:52:38 -07:00
Earle F. Philhower, III
ae908c8e9b
Use real FreeRTOS tasks to idle core during flash (#1444)
Fixes #1439

Use a real FreeRTOS task, at the highest priority, to idle the other core
while doing flash accesses.

The USB stack seems to have some timing dependent bits which get broken
if FreeRTOS switches out the current task when it's running.  Avoid any
issue by disabling preemption on the core for all tud_task calls.

The PendSV handler disable flag can live completely inside the FreeRTOS
variant port, so remove any reference to it in the main core.

Tested using Multicode-FreeRTOS, #1402 and #1441

The USB FIFO interrupts were still being serviced even when the core was
frozen, leading to crashes.  Explicitly shut off IRQs on both the victim
and the initiator core when freezing.

Removed the need for hack __holdUpPendSV flag
2023-05-15 18:10:30 -07:00
Earle F. Philhower, III
723c81470a
Update contrib.rst 2023-05-15 10:09:30 -07:00
Alessandro Ranellucci
a7905fba3e
Add Arduino CLI installation instructions (#1447) 2023-05-15 09:29:12 -07:00
Earle F. Philhower, III
6e52b72523
Update macro for detecting this core in contributing docs (#1436) 2023-05-11 09:45:34 -07:00
git2212
ef4ec4185a
Add dummy Serial implementation when NO_USB defined (#1438)
Fixes #1434
2023-05-11 09:45:01 -07:00