This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why should PSELx = 0 when the APB transaction is completed?

It would seem that if I let PSELx stay at its existing value at the end of a transaction, rather than unconditionally setting it to 0, it would reduce power consumption, since PSELx wouldn't have to change when the next transaction selects the same PSELx.
This is certainly an advantage.

Nevertheless, why does the APB spec. require PSELx to be set to 0 at the end of a transaction?

Parents
  • Thank you for your response !!

    It really helps me to learn the APB protocol.


    But I have a question about Sampling.
    You said that sampling is done in the SETUP phase.
    Is the sampling done in the middle of the PCLK, not at the PCLK edge?
    If only PSELx has the correct value in the middle of the SETUP phase, but PADDR is still being set to the correct value and has an incorrect value, if Peripheral is sampling at this time, Peripheral may sample the incorrect value and cause problems.
    When does Peripheral sample PSELx and PADDR in the SETUP phase?

Reply
  • Thank you for your response !!

    It really helps me to learn the APB protocol.


    But I have a question about Sampling.
    You said that sampling is done in the SETUP phase.
    Is the sampling done in the middle of the PCLK, not at the PCLK edge?
    If only PSELx has the correct value in the middle of the SETUP phase, but PADDR is still being set to the correct value and has an incorrect value, if Peripheral is sampling at this time, Peripheral may sample the incorrect value and cause problems.
    When does Peripheral sample PSELx and PADDR in the SETUP phase?

Children