You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/06/28 04:23:24 UTC

[GitHub] [incubator-nuttx] v01d opened a new pull request #1310: stm32l4 RCC: configure flash wait states early

v01d opened a new pull request #1310:
URL: https://github.com/apache/incubator-nuttx/pull/1310


   ## Summary
   
   Flash wait states setting on STM32L4 clock configuration routine was done too late: MSI clock range selection was being performed before this, which means that using MSI as system clock (the default) but requesting a higher frequency would lead to use a number of wait states equal to zero (the default) until the wait states setting code was reached. This led to corruption of execution state, which was actually only observed on non-optimized code (possibly due to the longer execution time between clock increase and flash configuration). This changes moves flash configuration to the top of the clock configuration routine.
   
   ## Impact
   
   STM32L4 on non-default MSI frequency as system clock.
   
   ## Testing
   
   Tested on STM32L476.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis commented on pull request #1310: stm32l4 RCC: configure flash wait states early

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #1310:
URL: https://github.com/apache/incubator-nuttx/pull/1310#issuecomment-650760491


   Good finding Matias! I think it should be a good idea to include the above Summary into the commit itself because people looking the repository will not see it unless he comes to this 1310 PR. What do you think?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] v01d commented on pull request #1310: stm32l4 RCC: configure flash wait states early

Posted by GitBox <gi...@apache.org>.
v01d commented on pull request #1310:
URL: https://github.com/apache/incubator-nuttx/pull/1310#issuecomment-650775072


   I think the explanation I left in the code in the form of a comment serves to remind the importance of why that code should not be moved.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis commented on pull request #1310: stm32l4 RCC: configure flash wait states early

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #1310:
URL: https://github.com/apache/incubator-nuttx/pull/1310#issuecomment-650789079


   Ok, I think you explained it better here than in the code. BTW, let's to merge it now.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis merged pull request #1310: stm32l4 RCC: configure flash wait states early

Posted by GitBox <gi...@apache.org>.
acassis merged pull request #1310:
URL: https://github.com/apache/incubator-nuttx/pull/1310


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org