<?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>topic FLEXCOMM3_DriverIRQHandler is getting invoked even defining my own interrupt handler in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM3-DriverIRQHandler-is-getting-invoked-even-defining-my/m-p/2109760#M58302</link>
    <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;I am seeing an issue, not sure what is missing.&lt;/P&gt;&lt;P&gt;Please find more details,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define SPI3_IF          		SPI3
#define SPI3_CLK_SRC  			kCLOCK_Flexcomm3
#define SPI3_CLK_FREQ 			CLOCK_GetFlexCommClkFreq(3U)
#define SPI3_SLAVE_SELECT       0
#define SPI3_IRQHandler  		FLEXCOMM3_IRQHandler
#define SPI3_IRQn				FLEXCOMM3_IRQn&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my interrupt handler,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;uint16_t receiveBuff[256];
void SPI3_IRQHandler(void)
{
	uint16_t tmp_data;

	PRINTF("(%s) - %s() at line %d -&amp;gt; START\r\n",__FILE__,__func__,__LINE__);

	if ((SPI_GetStatusFlags(SPI3_IF) &amp;amp; kSPI_RxNotEmptyFlag))
        {
             tmp_data = SPI_ReadData(SPI3_IF);
	     receiveBuff[rxIndex] = tmp_data;
        }

SDK_ISR_EXIT_BARRIER;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the spi initialization,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;SPI_MasterGetDefaultConfig(&amp;amp;masterConfig);

	// Set the baudrate
	masterConfig.enableLoopback = false;
	masterConfig.enableMaster = true;
	masterConfig.polarity = kSPI_ClockPolarityActiveHigh;
	masterConfig.phase = kSPI_ClockPhaseFirstEdge;
	masterConfig.direction = kSPI_MsbFirst;
	masterConfig.baudRate_Bps = SPI3_BAUDRATE_500000;
	masterConfig.sselNum = kSPI_Ssel0;
	masterConfig.sselPol = (spi_spol_t)SPI3_SPOL;

	// SPI enable and Mast mode selection is done as part of this
	SPI_MasterInit(SPI3_IF, &amp;amp;masterConfig, SPI3_CLK_FREQ);

        SPI_EnableInterrupts(SPI3_IF, kSPI_TxLvlIrq | kSPI_RxLvlIrq);

        EnableIRQ(SPI3_IRQn);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I run the code, the control is going to "FLEXCOMM3_DriverIRQHandler", even in debug also I am seeing the same behavior. So I am wondering what is causing that.&lt;/P&gt;&lt;P&gt;I understand that, SDK specific interrupt handler gets invoked, only when there is any interrupt handler defined for it, but in this scenario there is an already interrupt handler defined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please let me know, what is missing?&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jun 2025 19:28:53 GMT</pubDate>
    <dc:creator>sushmasan</dc:creator>
    <dc:date>2025-06-03T19:28:53Z</dc:date>
    <item>
      <title>FLEXCOMM3_DriverIRQHandler is getting invoked even defining my own interrupt handler</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM3-DriverIRQHandler-is-getting-invoked-even-defining-my/m-p/2109760#M58302</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;I am seeing an issue, not sure what is missing.&lt;/P&gt;&lt;P&gt;Please find more details,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define SPI3_IF          		SPI3
#define SPI3_CLK_SRC  			kCLOCK_Flexcomm3
#define SPI3_CLK_FREQ 			CLOCK_GetFlexCommClkFreq(3U)
#define SPI3_SLAVE_SELECT       0
#define SPI3_IRQHandler  		FLEXCOMM3_IRQHandler
#define SPI3_IRQn				FLEXCOMM3_IRQn&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my interrupt handler,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;uint16_t receiveBuff[256];
void SPI3_IRQHandler(void)
{
	uint16_t tmp_data;

	PRINTF("(%s) - %s() at line %d -&amp;gt; START\r\n",__FILE__,__func__,__LINE__);

	if ((SPI_GetStatusFlags(SPI3_IF) &amp;amp; kSPI_RxNotEmptyFlag))
        {
             tmp_data = SPI_ReadData(SPI3_IF);
	     receiveBuff[rxIndex] = tmp_data;
        }

SDK_ISR_EXIT_BARRIER;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the spi initialization,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;SPI_MasterGetDefaultConfig(&amp;amp;masterConfig);

	// Set the baudrate
	masterConfig.enableLoopback = false;
	masterConfig.enableMaster = true;
	masterConfig.polarity = kSPI_ClockPolarityActiveHigh;
	masterConfig.phase = kSPI_ClockPhaseFirstEdge;
	masterConfig.direction = kSPI_MsbFirst;
	masterConfig.baudRate_Bps = SPI3_BAUDRATE_500000;
	masterConfig.sselNum = kSPI_Ssel0;
	masterConfig.sselPol = (spi_spol_t)SPI3_SPOL;

	// SPI enable and Mast mode selection is done as part of this
	SPI_MasterInit(SPI3_IF, &amp;amp;masterConfig, SPI3_CLK_FREQ);

        SPI_EnableInterrupts(SPI3_IF, kSPI_TxLvlIrq | kSPI_RxLvlIrq);

        EnableIRQ(SPI3_IRQn);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I run the code, the control is going to "FLEXCOMM3_DriverIRQHandler", even in debug also I am seeing the same behavior. So I am wondering what is causing that.&lt;/P&gt;&lt;P&gt;I understand that, SDK specific interrupt handler gets invoked, only when there is any interrupt handler defined for it, but in this scenario there is an already interrupt handler defined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please let me know, what is missing?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jun 2025 19:28:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM3-DriverIRQHandler-is-getting-invoked-even-defining-my/m-p/2109760#M58302</guid>
      <dc:creator>sushmasan</dc:creator>
      <dc:date>2025-06-03T19:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXCOMM3_DriverIRQHandler is getting invoked even defining my own interrupt handler</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM3-DriverIRQHandler-is-getting-invoked-even-defining-my/m-p/2112865#M58336</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;Can someone please look into this and let me know what I am&amp;nbsp; missing?&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;San&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jun 2025 13:50:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM3-DriverIRQHandler-is-getting-invoked-even-defining-my/m-p/2112865#M58336</guid>
      <dc:creator>sushmasan</dc:creator>
      <dc:date>2025-06-09T13:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: FLEXCOMM3_DriverIRQHandler is getting invoked even defining my own interrupt handler</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM3-DriverIRQHandler-is-getting-invoked-even-defining-my/m-p/2113328#M58345</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/221349"&gt;@sushmasan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The SDK uses a vector table redirection mechanism where:&lt;/P&gt;
&lt;P&gt;-The actual interrupt vector table points to SDK-provided handlers (like&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="hyc-common-markdown__code__inline"&gt;FLEXCOMM3_DriverIRQHandler&lt;/CODE&gt;)&lt;/P&gt;
&lt;P&gt;- These handlers then call your user-defined handlers if they exist&lt;/P&gt;
&lt;P&gt;Please try to modify the vector table.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Locate the interrupt vector table.&lt;/LI&gt;
&lt;LI&gt;Replace&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="hyc-common-markdown__code__inline"&gt;FLEXCOMM3_DriverIRQHandler&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;with your&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE class="hyc-common-markdown__code__inline"&gt;SPI3_IRQHandler&lt;/CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Hope it helps.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If still have any issue, please contact me without any hesitate. Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jul 2025 04:26:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/FLEXCOMM3-DriverIRQHandler-is-getting-invoked-even-defining-my/m-p/2113328#M58345</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2025-07-04T04:26:50Z</dc:date>
    </item>
  </channel>
</rss>

