noforth logo
november 2025

noForth CDC driver history

Authors: Leon Konings, Willem jager, Henny Luijkx & Willem Ouwerkerk

Copyright Wikipedia commons
USB logo

Timeline for the development of noForth t with USB

01) April 2024, Willem Ouwerkerk starts working on USB-CDC on RP2040.

02) Research into data together with Leon Konings: a) Analysis of the zeptoforth code b) Study of the RP2040 datasheet

03) April 2024, the first code: a) Hardware initialization taken from zeptoforth b) Leon gets to work on the CDC driver under Linux

04) May 2024, first attempts at USB output: a) This takes us about six months with limited success; despite gaining more insight, the driver is not progressing b) Various configuration tables tried without success c) The output works on a single Linux (Ubuntu) implementation An unstable intermediate version worked under Windows. ZeptoForth did not prove to be a good starting point for us, and the RP2040 datasheet was also difficult to understand.

05) October 2024, Willem Jager and Henny Luijkx join the project.

06) October 2024, Investigation into the functioning of Leon's driver.

07) December 2024, need for a simplified implementation: a) Used the code from Alex Taradov as a reference. b) Investigated multiple implementations. c) Got a little help from AI here and there. d) Created a new design based on Leon's structure.

08) December 3, 2024, Created setup for compact USB-CDC driver. Copied the device and configuration tables and request handling.

09) January 4, 2025, the setup stage works, structure greatly simplified: a) January 2, the USB sniffer is available, we can view USB packets, which will soon provide much more insight b) January 11, string output works. Part of the protocol is implemented in the RP2040 firmware, for example USB low level ACK/NAK handshakes. This made it difficult to extract what is needed from the USB documentation. A lot of experimentation and the USB sniffer via Wireshark provided the necessary insight into the details of the USB protocol.

10) January 2025, text input to RP2040 via USB-CDC: a) January 15, Willem Jager figured out key input The driver code was modified and the first working input was done. b) January 16, primitive key input in test loop. c) January 19, working KEY routine. d) January 23, noForth works with interactive input and output via CDC. The multitasker is used for improved real-time response.

11) February 17, Step by step further improvement of the driver: a) Factoring is improved. b) Program components are rewritten to code.

12) February - March, The USB driver crashes when sending files or pasting text. It seems to be too fast, so flow control is needed: a) Various options are being tried; Serial state notification, Control Line State Request, etc. Unfortunately, without success so far. b) Various handshake options for terminal applications are tried, but only the E4thcom application works on Linux with a slow HOST PC (Raspberry Pi 4). c) The low-level USB ACK/NAK seems to work in combination with measuring available space in the circular buffers. Through trial and error, we figured out what the RP2040 USB hardware already does for us d) A tracer via RS232 gives us more insight into why the ring buffers overflow, which gives direction to the software

13) March - April, We test the CDC driver with Linux, Windows, and macOS.

14) April - May, Testing and documenting usable terminal emulators: 1) Windows is Teraterm with 1 millisecond line delay. 2) Linux with GTKterm or Minicon with 1 ms and with e4thcom without delay. 3) macOS with Coolterm and character echo handshake. The low-level USB ACK/NAK handshake is secure up to a delay of 500 to 600 milliseconds per data packet, which is perfectly workable. With a longer delay, communication fails.

15) June 15, Project completion a) Willem Jager starts working on the USB documentation.

16) June 14-2025, dual CDC implementation attempt b) C example found with the help of a visitor to Alex Taradov's Github page. c) Leon compiles a working UF2 file from it. d) Data collected and documented using the USB sniffer. e) Henny Luijkx has started to document the configuration records in detail to gain a better understanding of the function of each record and to document the project.

17) September 1-2025, Redesign of driver factorisation

18) September 15-2025, The dual CDC driver is working and has been completed. The driver runs in three tasks of the multitasker and uses spinlocks from the RP2040 as write protection between the two noForth-t-duo cores. The single CDC has been further reduced; it runs in two tasks of the multitasker and uses execution tables to handle the setup requests.

October 18-2025, realisation of a high level USB CDC driver. (without dependencies on noForth and multitasker)

19) October 23-2025, Complete rewrite of both versions. The rewrite and testing of those versions was finished in november 2025.

*