6694 Commits

Author SHA1 Message Date
hathach
77f0726361 fix ehci issue with portsc when enable port power and port reset
fix attached device not regconized if attached before power on
2023-05-09 17:32:14 +07:00
hathach
04c759028a simplify cmake target, remove -bsp 2023-05-09 10:02:44 +07:00
hathach
fd50be2e62 change imxrt board_uart_read() to non-blocking
simple host seems to work
2023-05-08 19:43:48 +07:00
hathach
4fc4f35a8a fix linking missing ivt symbol for imxrt with cmake
changed device port = 0, host port =1 for imxrt 1060 and 1064
2023-05-08 17:25:47 +07:00
hathach
654f182176 build host examples with imx 2023-05-08 00:24:48 +07:00
hathach
6945c594d5 update all device cmake example for imx 2023-05-07 22:09:08 +07:00
hathach
f15f79df5d cmake work well with imxrt 2023-05-06 15:14:54 +07:00
hathach
cda5ab8b25 more temp work 2023-05-05 19:15:19 +07:00
hathach
97ee40fd7b add clion files 2023-05-05 16:51:50 +07:00
hathach
8a9d2b4b75 wip 2023-05-04 23:29:37 +07:00
hathach
629717cd13 fix cmake build 2023-05-04 16:38:06 +07:00
Ha Thach
5e023fa2ca
Merge pull request #2051 from hathach/improve-serial-host
Improve serial host
2023-04-28 22:59:57 +07:00
hathach
1763eede48
more update to host serial API 2023-04-28 22:14:14 +07:00
hathach
fb5fe3360f
allow call tuh cdc with blocking (callback = NULL)
- tuh_cdc_set_control_line_state()
- tuh_cdc_set_baudrate()
- tuh_cdc_set_line_coding()
2023-04-28 21:50:54 +07:00
hathach
0a43a7b418
improve host serial drivers
- tuh_control_xfer() update xfer result to user_data if complete
callback = NULL (sync/blocking)
- refactor host serial driver for acm/ftdi/cp210x
2023-04-28 19:13:25 +07:00
Ha Thach
2afef458be
Merge pull request #2030 from slc-tl/patch-1
Update porting.rst
2023-04-28 11:36:14 +07:00
hathach
090078542f update osal note 2023-04-28 11:34:12 +07:00
Ha Thach
a41ab41b8b
Merge pull request #2047 from jbtheou/master
cdc: fix line_coding aligment
2023-04-28 11:25:53 +07:00
hathach
190acc1fb0 add aligned(4) for cdc_line_coding_t 2023-04-28 11:12:03 +07:00
Jean-Baptiste Theou
8f47976639 cdc: fix line_coding aligment
While calling tud_cdc_n_get_line_coding, the structure is copied into
the destination.

Dump of assembler code for function tud_cdc_n_get_line_coding:
   0x000193f4 <+0>:	mov.w	r2, #2112	@ 0x840
0x000193f8 <+4>:	ldr	r3, [pc, #20]	@ (0x19410
<tud_cdc_n_get_line_coding+28>)
   0x000193fa <+6>:	mla	r0, r2, r0, r3
=> 0x000193fe <+10>:	ldr.w	r3, [r0, #6]
   0x00019402 <+14>:	str	r3, [r1, #0]

On some platform (tested on LPC55S28), the address needs to be 4-bytes
aligned. Without this, the address is

(gdb) p &_cdcd_itf.line_coding
$3 = (cdc_line_coding_t *) 0x40100006 <_cdcd_itf+6>

which leads to a HardFault. With this fix

(gdb) p &_cdcd_itf.line_coding
$5 = (cdc_line_coding_t *) 0x40100008 <_cdcd_itf+8>

and the function can be called properly

Signed-off-by: Jean-Baptiste Theou <jb@thing.com>
2023-04-27 15:48:15 -10:00
Ha Thach
e3b3229d61
Merge pull request #2046 from hathach/add-usb2uart-host-driver
Add usb2uart serial host driver
2023-04-28 00:06:08 +07:00
hathach
732686cc10 add tuh_cdc_set_baudrate() 2023-04-27 23:22:10 +07:00
hathach
ee58278ed2 add code to calculate divisor from baudrate for ftdi 2023-04-27 23:08:25 +07:00
hathach
8214f0f497 clean up 2023-04-27 17:40:08 +07:00
hathach
c10f52b237 forgot to add cp210x header 2023-04-27 17:39:02 +07:00
hathach
438387be8c more refactor 2023-04-27 17:32:56 +07:00
hathach
86f6fd17ed cp210x seems to work well 2023-04-27 17:09:21 +07:00
hathach
a32ef1cde1 more host serial refactor 2023-04-27 16:32:42 +07:00
hathach
9698a088db refactor acm function 2023-04-27 15:29:44 +07:00
hathach
85d9925d24 refactor ftdi driver 2023-04-27 15:20:04 +07:00
hathach
293a6222f8 rename ftdi_host to ftdi_sio 2023-04-27 11:08:42 +07:00
hathach
cf95b44001 enable CDC FTDI 2023-04-26 22:36:17 +07:00
hathach
45169d833d hacky, but ftdi work with hard code baudrate = 9600 2023-04-26 22:36:17 +07:00
hathach
1a229f3ce2 fix pio vbus typo 2023-04-26 22:36:17 +07:00
Ha Thach
4c7fd1648e
Merge pull request #2043 from hathach/fix-nxp-build
fix build with nxp since mcux-sdk from 2.13.0 remove CMSIS folder
2023-04-26 22:33:28 +07:00
hathach
ad39833ea4 fix build with nxp since mcux-sdk from 2.13.0 remove CMSIS folder 2023-04-26 22:10:13 +07:00
Ha Thach
908e23d109
Merge pull request #2040 from hathach/update-imxrt-deps
bump up imxrt mcux-sdk to 2.13.1
2023-04-24 16:59:05 +07:00
hathach
841a62170e bump up imxrt mcux-sdk to 2.13.1 commit f357a1150f6cf6c6b844f53f2d426bfb3e649850 2023-04-24 16:54:26 +07:00
Ha Thach
964e7ebf21
Merge pull request #2013 from tannewt/imx_1042
Handle iMX RT 1042 usb naming
2023-04-24 16:53:24 +07:00
Ha Thach
8ede566c41
Merge pull request #2039 from hathach/add-cmake-build
Add cmake build
2023-04-24 16:43:40 +07:00
hathach
a4d5d51549 add wip note 2023-04-24 16:24:06 +07:00
hathach
5254202b20 minor update 2023-04-24 11:54:58 +07:00
hathach
9858d45815 build all freertos, not able to build net lwip due to lack of sio_open() 2023-04-21 22:07:58 +07:00
hathach
11e1aff389 update freeRTOS kernel to latest for library cmake
add per family freeRTOSConfig.h also make changes to build with
freertos_kernel cmake
- hard coded configPRIO_BITS based on family
- change configSUPPORT_STATIC_ALLOCATION to 0,
configSUPPORT_DYNAMIC_ALLOCATION to 1
- enable configRECORD_STACK_HIGH_ADDRESS for tracing
- enable INCLUDE_xTaskGetCurrentTaskHandle which is required to compile
stream_buffer (although we don't use it).
2023-04-21 20:55:44 +07:00
hathach
6daa135201 update most examples cmake to build with imxrt 2023-04-21 18:23:40 +07:00
hathach
0afe1b3684 example run well with cmake for imxrt 2023-04-21 18:10:28 +07:00
Ha Thach
0871238cac
Merge pull request #2024 from jfedor2/sie_ctrl_fix
[rp2040] Make writes to SIE_CTRL aware of concurrent access
2023-04-21 12:17:57 +07:00
Jacek Fedorynski
9bf97e3e52 [rp2040] Make writes to SIE_CTRL aware of concurrent access
This commit makes it so that when setting the START_TRANS bit in the
SIE_CTRL register, along with some other bits, we first set all the
other bits, then wait some cycles, and then set the START_TRANS bit.

Doing so protects against a situation where the USB controller is
reading the register at the same time and gets an incorrect value.

This mirrors the procedure already applied to buffer control
registers.
2023-04-20 20:23:31 +02:00
hathach
2ac289685a clean up 2023-04-20 16:55:48 +07:00
hathach
b42d3e431c board test running with cmake 2023-04-20 16:43:00 +07:00