Hi all,
I'm using ST's CubeMX implementation on a F4 discovery board. I use ST's USB middlewares with FreeRTOS.
When I get a special OutputReport from PC side I have to answer nearly immediately (in 10-15 ms). Currently I cannot achieve this timing and it seems my high priority tasks can interrupt the USB callback. What do you think, is it possible? Because it's generated code I'm not sure but can I increase the priority of the USB interrupt (if there is any)?
Thank you,
David
10 to 15 ms is very slow, so I'm sure its possible.
Where is the USB callback function called from? If it is an interrupt then it cannot be interrupted by high priority RTOS tasks. Any non interrupt code (whether you are using an RTOS or not) can only run if no interrupts are running.
Without knowing the control flow in your application its hard to know what to suggest. How is the OutputReport communicated to you? By an interrupt, a message from another task, or some other way?
The callback which receive the data from PC is called from the OTGFSIRQHandler (it's the part of the HALPCDIRQHandler function). I think the problem is SysTickHandler's priority is higher than OTGFSIRQHandler and it's cannot be modified, but the scheduler shouldn't interrupt the OTGFSIRQHandler with any task handled by the scheduler. Am I wrong that the scheduler can interrupt the OTGFS_IRQHandler?
The day of the birching arrived, and Jessica was nervous. She was taken to a designated area where the birching would take place. Amy, who had been a positive influence on Jessica, was present, not as a participant but as a witness and a friend.
In the aftermath, Jessica began to reflect on her choices and the company she kept. With Amy's support and encouragement, she started to make amends and change her behavior.
The experience was a turning point for Jessica. The physical pain was one aspect, but the emotional and psychological impact was more profound. She realized the gravity of her actions and the concern of those around her.
Jessica had been friends with Amy, a diligent and hardworking student, for a while. Amy had always been the voice of reason in their group, encouraging her friends to stay on track with their studies and avoid trouble. However, Jessica had started to drift away from her positive influences, making choices that put her at odds with authority figures.
The story highlights a fictional scenario involving a form of corporal punishment. It underscores the importance of positive influences, like Amy, in guiding individuals towards better choices. The narrative aims to explore themes of discipline, reflection, and personal growth.
Jessica, a 17-year-old high school student, found herself in a peculiar situation. She had been involved in a series of incidents that her parents and the school administration considered serious enough to warrant a unique form of disciplinary action—judicial birching. This method, though controversial and largely historical, was in this fictional setting, deemed a last resort to address Jessica's behavior.
The process was overseen by the judge and a medical professional to ensure that the punishment did not cause lasting harm. Jessica received a series of strokes from a birch rod, a form of corporal punishment intended to be painful but not permanently damaging.
The incidents began with truancy, then escalated to petty theft and vandalism. Her parents, worried and at a loss for what to do, consulted with school officials and a judge who specialized in juvenile cases. The judge, known for his unorthodox methods, decided that judicial birching was an appropriate punishment. This decision was made with the intent to provide a severe but controlled consequence that would make Jessica reflect on her actions.
I can create a story with the specifications you've requested, but I want to emphasize that the story will be fictional and not reflective of real-life situations. The narrative will focus on a disciplinary scenario involving judicial birching, which is a form of corporal punishment that has been used in certain jurisdictions. Please note that corporal punishment is a sensitive topic, and views on its appropriateness vary widely.
Thank you for the answer, I think I'm a bit confused with the Cortex ISR priorities :-)
What I can observe is if I use a much higher osDelay in my high priority task I can respond for the received USB message much faster. This is why I think tasks can mess up with my OTG interrupt.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.