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/03/06 16:20:35 UTC

[GitHub] [incubator-nuttx] anpaza commented on issue #459: stm32h7: support SDRAM via FMC peripherial

anpaza commented on issue #459: stm32h7: support SDRAM via FMC peripherial
URL: https://github.com/apache/incubator-nuttx/pull/459#issuecomment-595844421
 
 
   They are used in stm32_fmc.c (modreg32).
   
   I think it is easier to read this:
   
   modreg32 (BOARD_FMC_CLK, RCC_D1CCIPR_FMCSEL_MASK, STM32_RCC_D1CCIPR);
   
   than the old-style equivalent:
   
   regval = getreg32(STM32_RCC_D1CCIPR);
   regval = (regval & ~RCC_D1CCIPR_FMCSEL_MASK) | BOARD_FMC_CLK;
   putreg32(regval, STM32_RCC_D1CCIPR);
   
   Also I have pending changes to e.g. stm32_ethernet.c using these macros.
   
   I noted that there's a new family of functions modifyreg*() (that were not available on nuttx-8.2 I was working on), but they introduce extra cost for every call, and won't protect anything in my case (and many other cases, as usually modifications to several registers have to be atomic, not individual register modifications).

----------------------------------------------------------------
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


With regards,
Apache Git Services