You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2022/01/26 22:06:32 UTC

[GitHub] [mynewt-core] wes3 opened a new pull request #2755: hal: Modify hal_system_restart

wes3 opened a new pull request #2755:
URL: https://github.com/apache/mynewt-core/pull/2755


   Two changes to the code: clear ICPR register (to clear any pending interrupts) and also leave global interrupts enabled when calling hal_system_start. The idea behind this change is that the cortex-M has global interrupts enabled on reset and that this should be the state when the system is restarted.
   
   For now, I only modified the code in the hw/mcu/dialog directory to have a discussion regarding this change in case folks object. I am not sure why there is a both a hal_system_start and hal_system_restart function but given there were two I decided to change restart only. It appears that mcuboot for mynewt calls hal_system_start and it should probably call hal_system_restart or we should abandon hal_system_restart and have hal_system_start clear ICER and ICPR and leave primask with interrupts enabled.


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

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

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



[GitHub] [mynewt-core] wes3 commented on pull request #2755: hal: Modify hal_system_restart

Posted by GitBox <gi...@apache.org>.
wes3 commented on pull request #2755:
URL: https://github.com/apache/mynewt-core/pull/2755#issuecomment-1023741250


   @kasjer yes once folks agreed with the changes these will get ported to different MCUs


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

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

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



[GitHub] [mynewt-core] vrahane commented on pull request #2755: hal: Modify hal_system_restart

Posted by GitBox <gi...@apache.org>.
vrahane commented on pull request #2755:
URL: https://github.com/apache/mynewt-core/pull/2755#issuecomment-1023439856


   I sort of agree, since we generally use hal_system_start() so, I think we should probably clear ICPR and ICER there and use primask.
   
   Calling hal_system_restart() from hal_system_start() is a little bit weird in my opinion but either ways I think this change is useful.


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

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

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



[GitHub] [mynewt-core] andrzej-kaczmarek commented on pull request #2755: hal: Modify hal_system_restart

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek commented on pull request #2755:
URL: https://github.com/apache/mynewt-core/pull/2755#issuecomment-1024008422


   that makes sense, so will just wait for updated PR with changes to other CM MCUs


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

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

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



[GitHub] [mynewt-core] wes3 merged pull request #2755: hal: Modify hal_system_restart

Posted by GitBox <gi...@apache.org>.
wes3 merged pull request #2755:
URL: https://github.com/apache/mynewt-core/pull/2755


   


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

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

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



[GitHub] [mynewt-core] wes3 commented on pull request #2755: hal: Modify hal_system_restart

Posted by GitBox <gi...@apache.org>.
wes3 commented on pull request #2755:
URL: https://github.com/apache/mynewt-core/pull/2755#issuecomment-1023489365


   @vrahane Not sure you were saying this, but I was not suggesting calling hal_system_restart from hal_system_start. As of now, hal_system_restart calls hal_system_start which is fine assuming we want to keep hal_system_restart. Thinking more about this, I think it fine to have both functions as there may be a case where you dont want to clear all interrupts. I just think there are some places where hal_system_restart should be called as opposed to hal_system_start.


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

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

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



[GitHub] [mynewt-core] wes3 commented on pull request #2755: hal: Modify hal_system_restart

Posted by GitBox <gi...@apache.org>.
wes3 commented on pull request #2755:
URL: https://github.com/apache/mynewt-core/pull/2755#issuecomment-1026107877


   I modified some of the other MCUs. I did not do anything to code that did not have a hal_system_restart() function or somewhat similar code so in effect this only ended up modifying the dialog and nrf mcu implementations.


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

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

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