<?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>MQX Software SolutionsのトピックRe: &amp;quot;Exception vector name: Address error&amp;quot;  with QSPI example + other tasks</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177618#M2451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;No, error does not come when I add a breakpoint.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 May 2009 21:19:14 GMT</pubDate>
    <dc:creator>JaimeR</dc:creator>
    <dc:date>2009-05-25T21:19:14Z</dc:date>
    <item>
      <title>"Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177603#M2436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the QSPI example and it works fine. However, when I add more TASKS to the project an error comes up, the error reads: "Exception vector name: Address error".&lt;/P&gt;&lt;P&gt;I have observed the following:&lt;/P&gt;&lt;P&gt;1.-Project works fine when I only use QSPI task.&lt;/P&gt;&lt;P&gt;2.-The other tasks work fine without QSPI task.&lt;/P&gt;&lt;P&gt;3.-If I insert a breakpoint into QSPI task and hit the run button continously, the error never comes up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Within the QSPI task there is memory allocation... I asign memory with this function&lt;/P&gt;&lt;P&gt;send_buffer = _mem_alloc_zero(SEND_BUFFER_SIZE);&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I free memory with this function&amp;nbsp; _mem_free(send_buffer);&lt;/P&gt;&lt;P&gt;What am I missing?&lt;/P&gt;&lt;P&gt;What documentation should I read?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Task is like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp; void QSPI_task&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (&lt;BR /&gt;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; FILE_PTR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fd;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; uint_32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i=0, result;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; uint_32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; len;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; uint_32&amp;nbsp; param = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; uint_16 algo[1];&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; printf("\n\n-------------- Begin QSPI EEPROM example --------------\n\n");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; /* Open the QSPI controller */&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; fd = fopen(IO_PORT, (pointer)(QSPI_DEVICE_MASTER_MODE));&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (fd == NULL)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\n Failed to open the QSPI Controller, exiting....");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _time_delay(200L);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _mqx_exit(1L);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; } /* Endif */&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; while(1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Allocate memory for the buffers&lt;BR /&gt;&amp;nbsp;send_buffer = _mem_alloc_zero(SEND_BUFFER_SIZE);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (send_buffer == NULL)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\nFailed to get buffer");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _task_block();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; recv_buffer = _mem_alloc_zero(RECV_BUFFER_SIZE);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (recv_buffer == NULL)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\nFailed to get buffer");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _mem_free(send_buffer);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _task_block();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; data_buffer = _mem_alloc_zero(RECV_BUFFER_SIZE);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (data_buffer == NULL)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\nFailed to get buffer");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _mem_free(send_buffer);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _mem_free(recv_buffer);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _task_block();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; algo[0] = 0xAA;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; send_buffer[0] = 0xAA;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; recv_buffer[0] = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; recv_buffer[1] = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; param = QSPI_CHIP_SELECT_SET_1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; param = QSPI_CS3;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ioctl(fd, IO_IOCTL_QSPI_CHIP_SELECT, &amp;amp;param);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = write(fd, send_buffer, 1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; param = QSPI_CS2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ioctl(fd, IO_IOCTL_QSPI_CHIP_SELECT, &amp;amp;param);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = write(fd, send_buffer, 1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //result = write(fd, &amp;amp;algo, 1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Free the buffer memory */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _mem_free(send_buffer);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _mem_free(recv_buffer);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _mem_free(data_buffer);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _time_delay(1000L);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;} /* Endbody */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jaime&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 May 2009 01:55:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177603#M2436</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-05-02T01:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177604#M2437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jaime,&lt;/P&gt;&lt;P&gt;briefly looking at your code and it seems to be all right. Can you provide more information about the failure? Does it happen immediately or after time? Does it happen randomly or always in the same time?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2009 15:35:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177604#M2437</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-05-04T15:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177605#M2438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The failure happens always as soon as I hit the run button from the debug screen. It happens always at&lt;/P&gt;&lt;P&gt;the same time BUT if I activate a break point in the QSPI task and hit the run button continously ( when&lt;/P&gt;&lt;P&gt;it stops in the breakpoint ) the failure never shows.&lt;/P&gt;&lt;P&gt;I believe the failure has something to do with the memory. I think QSPI task is using memory from&amp;nbsp;&lt;/P&gt;&lt;P&gt;another task, thus corrupting the program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2009 21:08:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177605#M2438</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-05-04T21:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177606#M2439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The failure does not come if I do the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Activate a BreakPoint ANYWHERE in the code.&lt;/P&gt;&lt;P&gt;Run the code.&lt;/P&gt;&lt;P&gt;Remove the BreakPoint the first time it stops there.&lt;/P&gt;&lt;P&gt;Run the code again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Failure comes from memory allocation instructions since when I use a commun array to send data the program behaves correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Array without using _mem_alloc_zero instruction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uint_16 algo[1];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; algo[0] = 0xAA;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = write(fd, &amp;amp;algo, 1);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 01:01:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177606#M2439</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-05-05T01:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177607#M2440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jaime,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried your code and it works without failure, no exception.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 18:10:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177607#M2440</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-05-05T18:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177608#M2441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Mmmhhh, are you using more tasks?, the problem only comes when I add more tasks.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 21:03:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177608#M2441</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-05-05T21:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177609#M2442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I was using main_task and QSPI_task:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
TASK_TEMPLATE_STRUCT  MQX_template_list[] = {   { 10L, main_task, 800L, 8L, "Main", MQX_AUTO_START_TASK},   { 11L, QSPI_task, 800L, 7L, "QSPI", 0L},   { 0L,  0L,        0L,   0L, 0L,     0L }};MQX_INITIALIZATION_STRUCT  MQX_init_struct ={   BSP_DEFAULT_PROCESSOR_NUMBER,   BSP_DEFAULT_START_OF_KERNEL_MEMORY,   BSP_DEFAULT_END_OF_KERNEL_MEMORY,   BSP_DEFAULT_INTERRUPT_STACK_SIZE,   (pointer)MQX_template_list,   BSP_DEFAULT_MQX_HARDWARE_INTERRUPT_LEVEL_MAX,   BSP_DEFAULT_MAX_MSGPOOLS,   BSP_DEFAULT_MAX_MSGQS,   BSP_DEFAULT_IO_CHANNEL,   BSP_DEFAULT_IO_OPEN_MODE};/* DEBUG */#define QSPI_DEBUG                   1 // Allow printf#define QSPI_DEBUG_STATUS            0#define QSPI_DEGUG_WRITE_BYTE        0#define QSPI_DEBUG_READ_BYTE         0#define QSPI_DEBUG_WRITE_DATA_SHORT  1#define QSPI_DEBUG_WRITE_DATA_LONG   1#define QSPI_DEBUG_READ_DATA         1volatile uint_32 _mqx_monitor_type = 3;/*FUNCTION*---------------------------------------------------------------* * Function Name : eeprom_baud_rate* Comments  : This function displays current baud rate and then change it*             4.00Mhz and change it back to default (1.00 Mhz)             **END*----------------------------------------------------------------------*/void eeprom_baud_rate ( FILE_PTR  fd){   uint_32 param = 0;      /* Display current Baud */   ioctl(fd, IO_IOCTL_SERIAL_GET_BAUD, &amp;amp;param);   printf ("\nCurrent Baud frequency %dHz.\n", param);   /* Set a different Baud */   param = 4000000;   printf ("\nChanging the Baud frequency to 4000000Hz");   ioctl(fd, IO_IOCTL_SERIAL_SET_BAUD, &amp;amp;param);      /* Display current Baud */   ioctl(fd, IO_IOCTL_SERIAL_GET_BAUD, &amp;amp;param);   printf ("\nCurrent Baud frequency %dHz.\n", param);   /* Set to the previous Baud */   param = 1000000;   printf ("\nChanging the Baud frequency to 1000000Hz");   ioctl(fd, IO_IOCTL_SERIAL_SET_BAUD, &amp;amp;param);   /* Display current Baud */   ioctl(fd, IO_IOCTL_SERIAL_GET_BAUD, &amp;amp;param);   printf ("\nCurrent Baud frequency %dHz.\n", param);     }/*FUNCTION*---------------------------------------------------------------* * Function Name : eeprom_write_enable* Comments  : This function sets enable latch to enable EEPROM write *             operation**END*----------------------------------------------------------------------*/void eeprom_write_enable ( FILE_PTR  fd){   uint_32 result, param;      printf("\nWrite Enable Latch to EEPROM");      param = QSPI_CHIP_SELECT_SET_0;   ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);   param = QSPI_CHIP_SELECT_SET_1;   ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);         /* Write enable instruction */   send_buffer[0] = TEST_ROM_SET_WRITE_ENABLE_LATCH;   result = write(fd, send_buffer, 1);      param = QSPI_CHIP_SELECT_SET_0;   ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);   param = QSPI_CHIP_SELECT_SET_1;   ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);         if (result != 1)      printf("\nWrite Enable Latch: FAILED\n");   else      printf("\nWrite Enable Latch: PASS\n");   }/*FUNCTION*---------------------------------------------------------------* * Function Name : eeprom_read_status* Comments  : This function reads EEPROM status register             **END*----------------------------------------------------------------------*/void eeprom_read_status ( FILE_PTR  fd){   uint_32 result, param;   printf("\nREAD EEPROM STATUS.");#if QSPI_DEBUG_STATUS   while(1) { // Debug#endif            send_buffer[0] = TEST_ROM_READ_STATUS;      recv_buffer[0] = 0;      recv_buffer[1] = 0;      param = QSPI_CHIP_SELECT_SET_0;      ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);      /* Begin CR 2102 */      result = write(fd, send_buffer, 1);      /* End CR 2102 */            /* Read EEPROM status */      read(fd, recv_buffer, 1);            param = QSPI_CHIP_SELECT_SET_1;      ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);#if QSPI_DEBUG      /* Begin CR 2102 */            if(result != 1)      /* End CR 2102 */         printf("\nSend status read command FAILED.\n");      else      {         printf("\nSend status read command PASS.");         printf("\nEEPROM STATUS: 0x%x\n", recv_buffer[1]);      }#endif      #if QSPI_DEBUG_STATUS   } // Debug#endif}/*FUNCTION*---------------------------------------------------------------* * Function Name : eeprom_write_byte* Comments  : This function writes a data byte to EEPROM  *     **END*----------------------------------------------------------------------*/void eeprom_write_byte(FILE_PTR  fd, uint_16 addr, uchar data){   uint_32 result, param = 0;   send_buffer[0] = TEST_ROM_WRITE_DATA; // Write instruction   send_buffer[1] = ((addr&amp;gt;&amp;gt;8)&amp;amp;0xff);    // First address byte   send_buffer[2] = (addr&amp;amp;0xff);         // Last address byte   send_buffer[3] = data;                // Data      printf("\nWrite 0x%lx to Location 0x%lx EEPROM",              send_buffer[3], addr);      param = QSPI_CHIP_SELECT_SET_0;   ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);   result = write(fd, send_buffer, 4);      param = QSPI_CHIP_SELECT_SET_1;   ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);      if(result != 4)      printf("\nWrite a byte: FAILED\n");   else      printf("\nWrite a byte: PASS\n");      /* There is 5 ms internal write cycle needed for EEPROM */   _time_delay(5);   }/*FUNCTION*---------------------------------------------------------------* * Function Name : eeprom_read_byte* Comments  : This function reads 8 bits data from Microchip EEPROM 25LC640* Return: *         Number of byte read.             **END*----------------------------------------------------------------------*/uint_32 eeprom_read_byte ( FILE_PTR  fd, uint_16 addr){   uint_32    result, param;   uint_32    num = 0;      send_buffer[0] = TEST_ROM_READ_DATA;  // Read instrucation   send_buffer[1] = ((addr&amp;gt;&amp;gt;8)&amp;amp;0xff);    // First address byte   send_buffer[2] = (addr&amp;amp;0xff);         // Last address byte#if QSPI_DEBUG_READ_BYTE   while (1) { //Debug#endif         /* Bring CS low */   param = QSPI_CHIP_SELECT_SET_0;   ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);         /* write instruction and address */   /* Begin CR 2102 */   result = write(fd, send_buffer, 3);   /* End CR 2102 */      /* Read data from EEPROM */   num = read(fd,recv_buffer,1);   *data_buffer++ = *recv_buffer;      param = QSPI_CHIP_SELECT_SET_1;   ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);   #if QSPI_DEBUG   /* Begin CR2102 */        if(result != 3)   /* End CR2102 */           printf("\nSend read command: FAILED.");   else   {      printf("\nSend read command and address: 0x%x 0x%x 0x%x",                                               send_buffer[0],                                               send_buffer[1],                                              send_buffer[2]);      printf("\nREAD DATA: ");                                              printf( "Location: 0x%lx; Data: 0x%lx\n",                 addr, *recv_buffer);   }#endif#if QSPI_DEBUG_READ_BYTE   } // Debug#endif      return (num);}/*FUNCTION*---------------------------------------------------------------* * Function Name : eeprom_write_data* Comments  : This function writes data to EEPROM  *     **END*----------------------------------------------------------------------*/uint_32 eeprom_write_data(FILE_PTR  fd, uint_16 addr,                        uint_32 size, uchar_ptr data){   uint_32 result, param = 0;   uint_32 i, len = size;      printf("\nWrite data to EEPROM");   send_buffer[0] = TEST_ROM_WRITE_DATA; // Write instruction   send_buffer[1] = ((addr&amp;gt;&amp;gt;8)&amp;amp;0xff);    // First address byte   send_buffer[2] = (addr&amp;amp;0xff);         // Last address byte      len += 3;   // Write Data   for (i = 0; i &amp;lt; size; i++)   {      send_buffer[i+3] = data[i];    }      param = QSPI_CHIP_SELECT_SET_0;   ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);      /*    ** EEPROM 25LC640 allows up to 32 byte page    ** after transmiting 32 byte we have change CS state.    */   result = write(fd, send_buffer, len);      param = QSPI_CHIP_SELECT_SET_1;   ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);      /* There is 5 ms internal write cycle needed for EEPROM */   _time_delay(5);         if(result != len)      printf("\nPage write to EEPROM: FALIED\n");   else   {      printf("\nWrite data to EEPROM: PASS");       printf("\nWrite data to EEPROM: ");      for(i=0;i&amp;lt;size;i++)         printf("%c", send_buffer[i+3]);      printf("\n");   }      return result;     }/*TASK*-------------------------------------------------------------------* * Task Name : main_task* Comments  :**END*----------------------------------------------------------------------*/void main_task   (      uint_32 dummy   ){   _task_create(0, 11L, 0);   while(1)    {     int i;     for (i = 0; i &amp;lt; 415646; i++);     printf("main task");   }}void QSPI_task(){   FILE_PTR                     fd;   uint_32                      i=0, result;   uint_32  param = 0;   uint_16 algo[1];   printf("\n\n-------------- Begin QSPI EEPROM example --------------\n\n");   /* Open the QSPI controller */           fd = fopen(IO_PORT, (pointer)(QSPI_DEVICE_MASTER_MODE));   if (fd == NULL)   {      printf("\n Failed to open the QSPI Controller, exiting....");      _time_delay(200L);      _mqx_exit(1L);   } /* Endif */   while(1)   {     // Allocate memory for the buffers send_buffer = _mem_alloc_zero(SEND_BUFFER_SIZE);   if (send_buffer == NULL)   {      printf("\nFailed to get buffer");      _task_block();   }   recv_buffer = _mem_alloc_zero(RECV_BUFFER_SIZE);   if (recv_buffer == NULL)   {      printf("\nFailed to get buffer");      _mem_free(send_buffer);      _task_block();   }   data_buffer = _mem_alloc_zero(RECV_BUFFER_SIZE);   if (data_buffer == NULL)   {      printf("\nFailed to get buffer");      _mem_free(send_buffer);      _mem_free(recv_buffer);      _task_block();   }              algo[0] = 0xAA;      send_buffer[0] = 0xAA;      recv_buffer[0] = 0;      recv_buffer[1] = 0;      param = QSPI_CHIP_SELECT_SET_1;      ioctl(fd, IO_IOCTL_QSPI_SET_CHIP_SELECT_STATE, &amp;amp;param);              param = QSPI_CS3;      ioctl(fd, IO_IOCTL_QSPI_CHIP_SELECT, &amp;amp;param);      result = write(fd, send_buffer, 1);      param = QSPI_CS2;      ioctl(fd, IO_IOCTL_QSPI_CHIP_SELECT, &amp;amp;param);      result = write(fd, send_buffer, 1);      //result = write(fd, &amp;amp;algo, 1);         /* Free the buffer memory */      _mem_free(send_buffer);      _mem_free(recv_buffer);      _mem_free(data_buffer);        printf("\nOK!");      _time_delay(1000L);        }} /* Endbody */&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:26:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177609#M2442</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2020-10-29T09:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177610#M2443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi JuroV,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still have the same problem, I don't know what is going on whit my program. I had a lot of tasks:&lt;/P&gt;&lt;P&gt;const TASK_TEMPLATE_STRUCT MQX_template_list[] =&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; //Task number, Entry point,&amp;nbsp;&amp;nbsp; Stack, Pri, String,&amp;nbsp;&amp;nbsp;&amp;nbsp; Auto?&lt;BR /&gt;//{ 1,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HVAC_Task,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1100,&amp;nbsp;&amp;nbsp; 9,&amp;nbsp; "HVAC",&amp;nbsp;&amp;nbsp;&amp;nbsp; MQX_AUTO_START_TASK},&lt;BR /&gt;//&amp;nbsp;&amp;nbsp; { 2,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Switch_Task,&amp;nbsp;&amp;nbsp;&amp;nbsp; 600,&amp;nbsp; 10,&amp;nbsp; "Switch",&amp;nbsp; MQX_AUTO_START_TASK},&lt;BR /&gt;&amp;nbsp;//&amp;nbsp; { 3,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Shell_Task,&amp;nbsp;&amp;nbsp;&amp;nbsp; 1400,&amp;nbsp; 12,&amp;nbsp; "Shell",&amp;nbsp;&amp;nbsp; MQX_AUTO_START_TASK},&lt;BR /&gt;&amp;nbsp;//&amp;nbsp; { 4,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Logging_task,&amp;nbsp; 1900,&amp;nbsp; 11,&amp;nbsp; "Logging", MQX_AUTO_START_TASK},&lt;BR /&gt;&amp;nbsp;//&amp;nbsp; { 5,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; USB_task,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1700L,&amp;nbsp; 8L, "USB",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MQX_AUTO_START_TASK},&lt;BR /&gt;&amp;nbsp;//&amp;nbsp; { 6,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tx_Task,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 900L,&amp;nbsp; 7L, "TX task",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0, 0, 0},&lt;BR /&gt;&amp;nbsp;//&amp;nbsp; { 7,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Rx_Task,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 900L,&amp;nbsp; 7L, "RX task",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0, 0, 0},&lt;BR /&gt;&amp;nbsp;//&amp;nbsp; { 8,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Main_Task,&amp;nbsp;&amp;nbsp;&amp;nbsp; 800L,&amp;nbsp; 8L, "Main task",&amp;nbsp;&amp;nbsp;&amp;nbsp; MQX_AUTO_START_TASK},&lt;BR /&gt;&amp;nbsp;//&amp;nbsp; { 9,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADC_task,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 800L,&amp;nbsp; 8L, "ADC Init",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MQX_AUTO_START_TASK},&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {10,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPT_task,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2000L,&amp;nbsp; 10L, "GPT Init",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MQX_AUTO_START_TASK},&lt;BR /&gt;//&amp;nbsp;&amp;nbsp; {11,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DMA_task,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 600L,&amp;nbsp; 8L, "DMA Init",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MQX_AUTO_START_TASK},&lt;BR /&gt;//&amp;nbsp; { 12,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QSPI_task,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2000L,&amp;nbsp; 10L, "QSPI Init",&amp;nbsp;&amp;nbsp;&amp;nbsp; MQX_AUTO_START_TASK},&lt;BR /&gt;// { 13,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CFM_task,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1000L,&amp;nbsp; 10L, "CFM Init",&amp;nbsp;&amp;nbsp;&amp;nbsp; MQX_AUTO_START_TASK},&lt;BR /&gt;&amp;nbsp; { 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see, I commented most of them to leave only GPT_task active. The problem continues, therefore I believe the this task is causing it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe the interrupts from GPT module are causing the problem because when the application crashes the "MQX Check for errors"shows me there has been an overflow from the Interrupt Stack...&lt;/P&gt;&lt;P&gt;First I tried to increase the amount of stack for interrupts but I stoped since I don't know how could a few interrupts consume all of the stack available, specially when I have empty ISR.&lt;/P&gt;&lt;P&gt;This is the task code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
void GPT_task(){ /* Body */   indice = 0;   //uint_8 algo = 0;   GPT_Initialize( 0, (pointer)MY_GPT_C0F_ISR);  /* GPT_Initialize( 1, (pointer)MY_GPT_C1F_ISR);   GPT_Initialize( 2, (pointer)MY_GPT_C2F_ISR);   GPT_Initialize( 3, (pointer)MY_GPT_C3F_ISR);*/   for(indice = 0; indice &amp;lt; 26 ;indice++)      key[indice ] = 0x55;   indice = 0;          while(1)   {         if(indice &amp;gt;= 26)         {            printf("Tarjeta Leida");            indice = 0;          }      _time_delay(10);   }} /* EndBody */&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;This is the Initialize function (which I wrote) I am calling from MQX libraries:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
uint_32 GPT_Initialize( uint_8 tim_num, pointer isr){ /* Body */   uint_8 algo;   volatile PSP_INTERRUPT_TABLE_INDEX index;   VMCF5225_STRUCT_PTR reg_ptr = _PSP_GET_IPSBAR(); //Controlar registros del Micro   volatile GPT_REG_STRUCT_PTR     gpt_reg_ptr; // Estructura para controlar GPT   void     (_CODE_PTR_ result)(pointer);   uint_32   return_code = GPT_OK;   gpt_reg_ptr = (pointer)(&amp;amp;((VMCF5225_STRUCT_PTR)_PSP_GET_IPSBAR())-&amp;gt;GPT);      gpt_reg_ptr-&amp;gt;GPTSCR1 &amp;amp;= ~MCF_GPT_GPTSCR1_GPTEN; //Detener el timer   gpt_reg_ptr-&amp;gt;GPTPACTL &amp;amp;= 0xFC;   gpt_reg_ptr-&amp;gt;GPTSCR2 &amp;amp;= 0x7F;   switch(tim_num)   {       case(0):               reg_ptr-&amp;gt;GPIO.PTAPAR = 0x55;//Todos funcion primaria               gpt_reg_ptr-&amp;gt;GPTDDR &amp;amp;= ~0xF1;               gpt_reg_ptr-&amp;gt;GPTIOS &amp;amp;= ~0xF1;                gpt_reg_ptr-&amp;gt;GPTSCR1 = 0x00;               gpt_reg_ptr-&amp;gt;GPTCTL2 |= MCF_GPT_GPTCTL2_EDG0A;            gpt_reg_ptr-&amp;gt;GPTCTL2 &amp;amp;= ~MCF_GPT_GPTCTL2_EDG0B;            gpt_reg_ptr-&amp;gt;GPTSCR2 = MCF_GPT_GPTSCR2_PR(1);            reg_ptr-&amp;gt;GPIO.PTAPAR &amp;amp;= ~0x03;            reg_ptr-&amp;gt;GPIO.PTAPAR |= MCF_GPIO_PTAPAR_PTAPAR0(1);               result = _int_install_isr (MCF5225_INT_TIMA_C0F, (void (_CODE_PTR_))isr, (pointer)gpt_reg_ptr);      if(result == NULL)      {          return_code = _task_get_error();      }      algo = 0;      while(algo &amp;lt; 0xFF)      {         algo++;       }            if ( _mcf5225_int_init(MCF5225_INT_TIMA_C0F, GPT_C0F_INT_LEVEL, GPT_C0F_INT_SUBLEVEL, TRUE) != MQX_OK)      {          return (GPT_INT_ENABLE_FAILED);      }      gpt_reg_ptr-&amp;gt;GPTIE &amp;amp;= 0x0F;      gpt_reg_ptr-&amp;gt;GPTIE |= MCF_GPT_GPTIE_CI0;               break;       case(1):               reg_ptr-&amp;gt;GPIO.PTAPAR = 0x55;               gpt_reg_ptr-&amp;gt;GPTDDR &amp;amp;= ~0xF2;               gpt_reg_ptr-&amp;gt;GPTIOS &amp;amp;= ~0xF2;               gpt_reg_ptr-&amp;gt;GPTSCR1 = 0x00;               gpt_reg_ptr-&amp;gt;GPTCTL2 |= MCF_GPT_GPTCTL2_EDG1A;            gpt_reg_ptr-&amp;gt;GPTCTL2 &amp;amp;= ~MCF_GPT_GPTCTL2_EDG1B;            gpt_reg_ptr-&amp;gt;GPTSCR2 = MCF_GPT_GPTSCR2_PR(1);            reg_ptr-&amp;gt;GPIO.PTAPAR &amp;amp;= ~0x0C;            reg_ptr-&amp;gt;GPIO.PTAPAR |= MCF_GPIO_PTAPAR_PTAPAR1(1);               result = _int_install_isr (MCF5225_INT_TIMA_C1F, (void (_CODE_PTR_))isr, (pointer)gpt_reg_ptr);      if(result == NULL)      {          return_code = _task_get_error();      }      if ( _mcf5225_int_init(MCF5225_INT_TIMA_C1F, GPT_C1F_INT_LEVEL, GPT_C1F_INT_SUBLEVEL, TRUE) != MQX_OK)      {          return (GPT_INT_ENABLE_FAILED);      }      gpt_reg_ptr-&amp;gt;GPTIE &amp;amp;= 0x0F;      gpt_reg_ptr-&amp;gt;GPTIE |= MCF_GPT_GPTIE_CI1;      break;    case(2):            reg_ptr-&amp;gt;GPIO.PTAPAR = 0x55;            gpt_reg_ptr-&amp;gt;GPTDDR &amp;amp;= ~0xF4;            gpt_reg_ptr-&amp;gt;GPTIOS &amp;amp;= ~0xF4;            gpt_reg_ptr-&amp;gt;GPTSCR1 = 0x00;            gpt_reg_ptr-&amp;gt;GPTCTL2 |= MCF_GPT_GPTCTL2_EDG2A;            gpt_reg_ptr-&amp;gt;GPTCTL2 &amp;amp;= ~MCF_GPT_GPTCTL2_EDG2B;            gpt_reg_ptr-&amp;gt;GPTSCR2 = MCF_GPT_GPTSCR2_PR(1);            reg_ptr-&amp;gt;GPIO.PTAPAR &amp;amp;= ~0x30;            reg_ptr-&amp;gt;GPIO.PTAPAR |= MCF_GPIO_PTAPAR_PTAPAR2(1);            result = _int_install_isr (MCF5225_INT_TIMA_C2F, (void (_CODE_PTR_))isr, (pointer)gpt_reg_ptr);      if(result == NULL)      {          return_code = _task_get_error();      }      if ( _mcf5225_int_init(MCF5225_INT_TIMA_C2F, GPT_C2F_INT_LEVEL, GPT_C2F_INT_SUBLEVEL, TRUE) != MQX_OK)      {          return (GPT_INT_ENABLE_FAILED);      }      gpt_reg_ptr-&amp;gt;GPTIE &amp;amp;= 0x0F;      gpt_reg_ptr-&amp;gt;GPTIE |= MCF_GPT_GPTIE_CI2;       break;    case(3):            reg_ptr-&amp;gt;GPIO.PTAPAR = 0x55;            gpt_reg_ptr-&amp;gt;GPTDDR &amp;amp;= ~0xF8;            gpt_reg_ptr-&amp;gt;GPTIOS &amp;amp;= ~0xF8;            gpt_reg_ptr-&amp;gt;GPTSCR1 = 0x00;            gpt_reg_ptr-&amp;gt;GPTCTL2 |= MCF_GPT_GPTCTL2_EDG3A;            gpt_reg_ptr-&amp;gt;GPTCTL2 &amp;amp;= ~MCF_GPT_GPTCTL2_EDG3B;            gpt_reg_ptr-&amp;gt;GPTSCR2 = MCF_GPT_GPTSCR2_PR(1);            reg_ptr-&amp;gt;GPIO.PTAPAR &amp;amp;= ~0xC0;            reg_ptr-&amp;gt;GPIO.PTAPAR |= MCF_GPIO_PTAPAR_PTAPAR3(1);      result = _int_install_isr (MCF5225_INT_TIMA_C3F, (void (_CODE_PTR_))isr, (pointer)gpt_reg_ptr);      if(result == NULL)      {          return_code = _task_get_error();      }      if ( _mcf5225_int_init(MCF5225_INT_TIMA_C3F, GPT_C3F_INT_LEVEL, GPT_C3F_INT_SUBLEVEL, TRUE) != MQX_OK)      {          return (GPT_INT_ENABLE_FAILED);      }      gpt_reg_ptr-&amp;gt;GPTIE &amp;amp;= 0x0F;        gpt_reg_ptr-&amp;gt;GPTIE |= MCF_GPT_GPTIE_CI3;      break;   }   if ( _mcf5225_int_init(MCF5225_INT_TIMA_TOF, GPT_C3F_INT_LEVEL, GPT_C3F_INT_SUBLEVEL, FALSE) != MQX_OK)   {   return (GPT_INT_ENABLE_FAILED);   }        if ( _mcf5225_int_init(MCF5225_INT_TIMA_PAIF, GPT_C3F_INT_LEVEL, GPT_C3F_INT_SUBLEVEL, FALSE) != MQX_OK)   {   return (GPT_INT_ENABLE_FAILED);   }         if ( _mcf5225_int_init(MCF5225_INT_TIMA_PAOVF, GPT_C3F_INT_LEVEL, GPT_C3F_INT_SUBLEVEL, FALSE) != MQX_OK)   {   return (GPT_INT_ENABLE_FAILED);   }      gpt_reg_ptr-&amp;gt;GPTFLG2  |= MCF_GPT_GPTFLG2_TOF;   gpt_reg_ptr-&amp;gt;GPTSCR2 &amp;amp;= ~MCF_GPT_GPTSCR2_TCRE;   gpt_reg_ptr-&amp;gt;GPTSCR1 |= MCF_GPT_GPTSCR1_GPTEN;//Iniciar el timer   return return_code;} /* Endbody */&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Well, I hope you can help me solve this since I am running out of ideas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:26:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177610#M2443</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2020-10-29T09:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177611#M2444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Can you specify your declaration of MY_GPT_C0F_ISR?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2009 15:24:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177611#M2444</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-05-20T15:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177612#M2445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the declaration for that function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
void MY_GPT_C0F_ISR();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;This is the definition for that function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
void MY_GPT_C0F_ISR()
{
   clearFlag(0);
  // key[indice++] = 0;
 return;
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;clearFlag(0);&amp;nbsp; calls a function I wrote in MQX libraries:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
void clearFlag(  //Número del timer   char tim_num){ /* Body */     volatile GPT_REG_STRUCT_PTR     gpt_reg_ptr; // Estructura para controlar GPT   gpt_reg_ptr = (pointer)(&amp;amp;((VMCF5225_STRUCT_PTR)_PSP_GET_IPSBAR())-&amp;gt;GPT);          //Limpia la bandera de interrupcion del timer correspondiente   switch(tim_num)   {           case(0):gpt_reg_ptr-&amp;gt;GPTFLG1  |= MCF_GPT_GPTFLG1_CF0;                   break;           case(1):gpt_reg_ptr-&amp;gt;GPTFLG1  |= MCF_GPT_GPTFLG1_CF1;                   break;           case(2):gpt_reg_ptr-&amp;gt;GPTFLG1  |= MCF_GPT_GPTFLG1_CF2;                   break;           case(3):gpt_reg_ptr-&amp;gt;GPTFLG1  |= MCF_GPT_GPTFLG1_CF3;                   break;           default: break;   }} /* Endbody */&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;Thanks&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&amp;nbsp;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:26:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177612#M2445</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2020-10-29T09:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177613#M2446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi JaimeR,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the ISR function is your source of problem. You MUST declare ISR function handled by MQX as&lt;/P&gt;&lt;P&gt;void function(pointer)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;even if you don't use any parameter of this function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So your solution is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;void MY_GPT_C0F_ISR(pointer dummy_param)
{
   clearFlag(0);
  // key[indice++] = 0;
 return;
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:26:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177613#M2446</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2020-10-29T09:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177614#M2447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am afraid this is not the problem... I already add the pointer as you suggested, and it continue to happen.&lt;/P&gt;&lt;P&gt;I then activate the pull up resistor using the&amp;nbsp; gpt_reg_ptr-&amp;gt;GPTSCR2 = 0x20 | MCF_GPT_GPTSCR2_PR(1);.&lt;/P&gt;&lt;P&gt;and also added the Fast Flag Clear. This time the error doesnt come exactly after I click the RUN button&lt;/P&gt;&lt;P&gt;into the debugger, instead it appears when I cause the interrupt. Some times the error is the&lt;/P&gt;&lt;P&gt;Exception vector name...&amp;nbsp; and sometimes the error is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Codewarrior encountered an unhandled exception 0xc0000005 at address 0x039f6587&lt;/P&gt;&lt;P&gt;(The memory at address 0x034c0004 could not be written)&lt;/P&gt;&lt;P&gt;Location: CFrtos_MQX.dll:0x10026587&lt;/P&gt;&lt;P&gt;Crash dump written to C:\Program Files\Freescale\CodeWarrior for ColdFire V7.1\bin\IDE.exe.b3024.20091521.104145A.dump&lt;/P&gt;&lt;P&gt;Choose 'Abort' to end the program, 'Retry' to debug, or 'Ignore' to continue (at your own risk!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you think?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 00:27:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177614#M2447</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-05-22T00:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177615#M2448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you enable interrupt MCF5225_INT_TIMA_TOF, MCF5225_INT_TIMA_PAIF and MCF5225_INT_TIMA_PAOVF without installing ISR? Makes no sense, although it should not be the source of problem. If you are not using those interrupts, then remove also enabling it (at the end of GPTInitialize).&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by JuroV on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-05-22&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;07:53 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 12:50:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177615#M2448</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-05-22T12:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177616#M2449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that is not the source of the problem since I added those lines after the error came.&lt;/P&gt;&lt;P&gt;I added those lines to make sure those interrupts are never triggered and that is the reason I am setting the&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // [IN} Unmask the interrupt now?&amp;nbsp;&amp;nbsp; parameter to FALSE.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Its really wierd, I dont know what else to try, I also have other interrupts working fine, even without the dummy pointer. &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 May 2009 00:59:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177616#M2449</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-05-23T00:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177617#M2450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;When you add breakpoint to the ISR of GPT, can you achieve error?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 15:03:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177617#M2450</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-05-25T15:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177618#M2451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;No, error does not come when I add a breakpoint.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 21:19:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177618#M2451</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-05-25T21:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177619#M2452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Unfortunatelly I have not experienced with GPT. It might seem that (perhaps) BDM (debugger) reads some value (or flag) from registers that you don't do in the ISR and is you need to.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2009 21:24:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177619#M2452</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-05-25T21:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177620#M2453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using the GPT it is necessary to read the counter to clear the interrupt (GPTC0, GPTC1, GPTC2 or GPTC3). Make sure that the read is an short word read (to be sure - I don't known whether it is relevant here but there are some registers which don't behave the same when other size accesses are made).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2009 03:12:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177620#M2453</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2009-05-26T03:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: "Exception vector name: Address error"  with QSPI example + other tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177621#M2454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you JuroV and Mark.&lt;/P&gt;&lt;P&gt;I just read GPT Channel Registers (GPTCn) since I am using Input Capture Function and error is not showing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2009 22:52:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/quot-Exception-vector-name-Address-error-quot-with-QSPI-example/m-p/177621#M2454</guid>
      <dc:creator>JaimeR</dc:creator>
      <dc:date>2009-05-28T22:52:10Z</dc:date>
    </item>
  </channel>
</rss>

