<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Kinetis MicrocontrollersのトピックRe: How do you toggle a register?</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-you-toggle-a-register/m-p/801616#M48748</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SPI0_PUSHR ^= SPI_PUSHR_CONT;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Or&lt;BR /&gt;&lt;STRONG&gt;*(volatile unsigned long *)(0x4002c000 + 0x34) ^= 0x80000000;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For best performance&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ATOMIC_SET_REGISTER(BIT_BANDING_PERIPHERAL_ADDRESS(SPI0_PUSHR_ADDR, 31));&lt;/STRONG&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;STRONG&gt;ATOMIC_CLEAR_REGISTER(BIT_BANDING_PERIPHERAL_ADDRESS(SPI0_PUSHR_ADDR, 31));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;to use bit-banding to set or clear.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For the details behind the bit banding method see:&lt;/EM&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFZnkZ1h_EAQ%26list%3DPLWKlVb_MqDQFZAulrUywU30v869JBYi9Q%26index%3D19" rel="nofollow" target="_blank"&gt;https://www.youtube.com/watch?v=FZnkZ1h_EAQ&amp;amp;list=PLWKlVb_MqDQFZAulrUywU30v869JBYi9Q&amp;amp;index=19&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2018 00:28:07 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2018-12-18T00:28:07Z</dc:date>
    <item>
      <title>How do you toggle a register?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-you-toggle-a-register/m-p/801615#M48747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using the K64F-FRDM, how do I toggle a register?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Address: Base Address + 34h offset&lt;/P&gt;&lt;P&gt;Using SPI0 for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to toggle field 31 CONT - Continuous Peripheral Chip Select Enable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be helpful if I was provided two methods of toggling:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Via KSDK method&lt;/P&gt;&lt;P&gt;2. Bare register method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Dec 2018 19:15:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-you-toggle-a-register/m-p/801615#M48747</guid>
      <dc:creator>photonflux</dc:creator>
      <dc:date>2018-12-15T19:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do you toggle a register?</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-you-toggle-a-register/m-p/801616#M48748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SPI0_PUSHR ^= SPI_PUSHR_CONT;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Or&lt;BR /&gt;&lt;STRONG&gt;*(volatile unsigned long *)(0x4002c000 + 0x34) ^= 0x80000000;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For best performance&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ATOMIC_SET_REGISTER(BIT_BANDING_PERIPHERAL_ADDRESS(SPI0_PUSHR_ADDR, 31));&lt;/STRONG&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;STRONG&gt;ATOMIC_CLEAR_REGISTER(BIT_BANDING_PERIPHERAL_ADDRESS(SPI0_PUSHR_ADDR, 31));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;to use bit-banding to set or clear.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For the details behind the bit banding method see:&lt;/EM&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFZnkZ1h_EAQ%26list%3DPLWKlVb_MqDQFZAulrUywU30v869JBYi9Q%26index%3D19" rel="nofollow" target="_blank"&gt;https://www.youtube.com/watch?v=FZnkZ1h_EAQ&amp;amp;list=PLWKlVb_MqDQFZAulrUywU30v869JBYi9Q&amp;amp;index=19&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2018 00:28:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/How-do-you-toggle-a-register/m-p/801616#M48748</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2018-12-18T00:28:07Z</dc:date>
    </item>
  </channel>
</rss>

