Unaligned access issue LPC55S69 #3184
Unanswered
fertinator
asked this question in
Q&A
Replies: 1 comment
-
I remembered that lpc55 usb1 can only do aligned read/write on USB sram like cortex m0 despite being cortex m55. I forgot the detail, it maybe because of the usb1 or maybe that sram section requires that. I did add some strict align option for device mode. Maybe the host code/driver isn't written or aware of that. ATM I don't have time to pull it out and test though. Lines 388 to 396 in f6bec10 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using an LPC55S69 Evalkit with TinyUSB 0.18.0.
A device is configured on USB1 and is working fine. I am now trying to have USB0 run as a CDC host to connect to a FTDI4232H USB-to-4Uart converter. All configuration of the host is fine, but the issue arises whenever I connect the FTDI4232H to the LPC. In the debug prints I see it tries to configure all, but at some point the LPC crashes.
The memory alignment is set to 64 bytes (LPC specific) in the config file. I also used the linker to split the USB RAM in 2 equal sections of 8 kB. USB1 is using the first section, USB0 the second section.
The LPC reports UsageFault, and sets specifically the unaligned access flag. Using the PC and LR registers saved during the crash I have been able to narrow it down a bit. See the info below
Debug output (level 2) just before crash:

The PC (program counter) sends me to the following place:

The LR (link register) sends me to the following place:

The function tu_edpt_validate is called when trying to open the ftdi chip
ftdi_open -> open_ep_stream_pair -> tuh_edpt_open -> tu_edpt_validate
Does anyone have a clue on what is going wrong? So far it is only the library handling things as I have no specific application callbacks in place.
Beta Was this translation helpful? Give feedback.
All reactions