Hello, Me & my team are currently developing a system using FRDM-K22F test cards. The work in 'HIGH-SPEED' is necessary for the proper functioning of our application. Still, we have to slow down to 'LOW-SPEED' to write in FLASH. This reduction of the speed induces a reset of the USB stack which create many communication problems with our HMI. Currently we are looking for a way around this problem, but it is difficult. Do you have any advice to give us? Thanks in advance community,
Thank you for your answer.
It seems we have figure out the problem. We did some configurations twice and that induced a reset of the stack.
The problem is solved now. Thank you for your help.
Thank you for your response.
But we are already in cyrstal-less mode. We suspect a problem in the stack usb itself, we have seen that the port stays open but the stack is never refreshed (no interruption anymore). Realterm is used for the send of message, but when we try to send message, it notifies 'transmition error'.
Thank you in advance,
I use the uTasker USB stack and so don't have issues
For other stacks you will need to contact their manufacturer since they may be sensitive.
I am assuming that with HIGH SPEED you mean "HSRUN mode and with LOW SPEED you mean normal RUN mode (rather than high speed and low speed USB). HSRUN is up to 12oMHz on the K22 used in the FRDM-K22F circuit and RUN mode is up to 80MHz.
In HSRUN mode flash programming is not possible so I assume that you are temporarily switching to 80MHz and this is disturbing your USB clock settings.
To avoid disturbing the USB clock you could run USB in crystal-less mode (derived from the 48MHz IRC) in device mode and thus maintain a constant clock to it. Alternatively, USB can be clocked from an external source (needing an additional oscillator) which would allow both device and host modes.
For production - note that not all K22s have HSRUN mode - there are some K22 parts that can operate to 120Mz in RUN mode and such a part may be more suitable for your final application.
For less questions and faster, cheaper developments: try uTasker for Kinetis