<?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: Hello , im having the follwing problem using my FRDM K64F platform, Im developing a Gateway that synchronizes its RTC with an SNTP server.</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Hello-im-having-the-follwing-problem-using-my-FRDM-K64F-platform/m-p/517984#M16352</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hola Javier,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please let me know the MQX version you are using??&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;Soledad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jun 2016 21:53:24 GMT</pubDate>
    <dc:creator>soledad</dc:creator>
    <dc:date>2016-06-14T21:53:24Z</dc:date>
    <item>
      <title>Hello , im having the follwing problem using my FRDM K64F platform, Im developing a Gateway that synchronizes its RTC with an SNTP server.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Hello-im-having-the-follwing-problem-using-my-FRDM-K64F-platform/m-p/517983#M16351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using any of the IP binding functions (ipcfg_bind_staticip, auto or DHCP) i don´t get a result, the system gets halted there, waiting for the function to finish ( it can be with an error or with the binding done succesfully) . This does not happen every time, but very frecuently. The code im using is the following ( the ip config and binding its highlighted in the end ) ( sorry for the comments in spanish , im from argentina )&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void main_task (uint32_t initial_data)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; IPCFG_IP_ADDRESS_DATA ip_data; //Estructura de datos de ip.&lt;/P&gt;&lt;P&gt;&amp;nbsp; _enet_address mac_address; //Definition for ENET six-byte Mac type. Vector de 6 uchar.&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t error; //Captura código de error&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t lastIp[4][4] = {0}; //Almaceno últimos valores. 0: Ip Servidor. 1: Ip Frdm. 2: MaskFrdm. 3: GtyFrdm.&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t verparamIp[4][4] = {0}; //Idem anterior pero utilizado para el comando verparam. Así si estoy cargando IPs y en el medio quiero ver parámetros no sobreescribe los valores ya cargados.&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t estampa[8] = {0}; //Buffer para escribir en pantalla luego de un itoa&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t lastIpaddr[4] = {0}; //Buffer donde se guardan los IPADDR luego de una leerIPdeFlash()&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t * checkIP = BASE_IPS_FLASH; //Dirección base 0xFB000. Se usa para revisar si la flash está vacía&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint8_t i;&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint16_t tiempo_poleo; //Almaceno el tiempo de poleo&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint16_t verparam_tiempo_poleo; //Lo utilizo para leerlo en el menú verparam (idem verparamIp)&lt;/P&gt;&lt;P&gt;&amp;nbsp; uart_state_t uartState, consoleState;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SERVER_MESSAGE_PTR msg_ptr;&lt;/P&gt;&lt;P&gt;&amp;nbsp; _queue_id maintask_qid;&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint16_t __ram_func[LAUNCH_CMD_SIZE/2]; //array to copy __Launch_Command func to RAM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Inicialización de pines de entrada/salida */&lt;/P&gt;&lt;P&gt;&amp;nbsp; GPIO_DRV_Init(gpio1_InConfig0,gpio1_OutConfig0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Inicialización de UART0 y UART3 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; //Uart 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; PORT_HAL_SetMuxMode((PORT_Type *)PORTC_BASE,16u,kPortMuxAlt3); // UART3_TX&lt;/P&gt;&lt;P&gt;&amp;nbsp; PORT_HAL_SetMuxMode((PORT_Type *)PORTC_BASE,17u,kPortMuxAlt3); // UART3_RX&lt;/P&gt;&lt;P&gt;&amp;nbsp; UART_DRV_Init(UART_INSTANCE, &amp;amp;uartState, &amp;amp;uartConfig);&lt;/P&gt;&lt;P&gt;&amp;nbsp; UART_DRV_InstallRxCallback(UART_INSTANCE, intPidenhora, NULL, NULL, true);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //Uart 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; UART_DRV_Deinit(CONSOLE_INSTANCE); //Elimino la UART abierta por MQX&lt;/P&gt;&lt;P&gt;&amp;nbsp; UART_DRV_Init(CONSOLE_INSTANCE, &amp;amp;consoleState, &amp;amp;consoleConfig); //Vuelvo a inicializarla&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Instalación de interrupciones en el vector */&lt;/P&gt;&lt;P&gt;&amp;nbsp; OSA_InstallIntHandler(PORTD_IRQn, (osa_int_handler_t)intTimestamp); //Int para PTD3. Evento externo.&lt;/P&gt;&lt;P&gt;&amp;nbsp; OSA_InstallIntHandler(UART3_RX_TX_IRQn, MQX_UART3_RX_TX_IRQHandler); //Int para UART3. Envío de time al CV.&lt;/P&gt;&lt;P&gt;&amp;nbsp; OSA_InstallIntHandler(UART0_RX_TX_IRQn, MQX_UART0_RX_TX_IRQHandler); //Int para UART0. Programa de consola.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; /* Seteo de prioridades de las interrupciones: 0x70 (Prioridad 7 &amp;gt; 2*MQX_MAX_LEVEL_INTERRUPT = 2*2 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; NVIC_SetPriority(UART3_RX_TX_IRQn, 112U);&lt;/P&gt;&lt;P&gt;&amp;nbsp; NVIC_SetPriority(UART0_RX_TX_IRQn, 112u);//112U&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Creación de RTCS */&lt;/P&gt;&lt;P&gt;&amp;nbsp; _RTCSTASK_priority = 6;//6&lt;/P&gt;&lt;P&gt;&amp;nbsp; _RTCSTASK_stacksize = RTCSCFG_STACK_SIZE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; error = RTCS_create();&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(error)&lt;/P&gt;&lt;P&gt;&amp;nbsp; { enviar_cadena("Error tarea RTC",3);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //printf("\nFailed to create RTCS, error = %X", (unsigned int)error);&lt;/P&gt;&lt;P&gt;&amp;nbsp; //return;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Inicialización de cola de mensajes para recibir IPs desde la tarea de consola */&lt;/P&gt;&lt;P&gt;&amp;nbsp; maintask_qid = _msgq_open(/*(_queue_number)*/MAIN_TASK_QUEUE, 0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Inicialización de FLASH para guardar IPs (no volatil) */&lt;/P&gt;&lt;P&gt;&amp;nbsp; error = FlashInit(&amp;amp;flashSSDConfig);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (FTFx_OK != error)&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; enviar_cadena("Error al iniciar la Flash",3);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; //This function provides a facility to relocate a function in RAM&lt;/P&gt;&lt;P&gt;&amp;nbsp; g_FlashLaunchCommand = (pFLASHCOMMANDSEQUENCE)RelocateFunction((uint32_t)__ram_func , LAUNCH_CMD_SIZE ,(uint32_t)FlashCommandSequence);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /**** INICIO de inicialización valores por default en la flash si está limpia ****/&lt;/P&gt;&lt;P&gt;&amp;nbsp; enviar_cadena("Iniciando GTW-NL...",3);&lt;/P&gt;&lt;P&gt;&amp;nbsp; enviar_cadena("Restableciendo parámetros de red...",2);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if((*(checkIP) == 0xFFFFFFFF) &amp;amp;&amp;amp; (*(checkIP+1) == 0xFFFFFFFF) &amp;amp;&amp;amp; (*(checkIP+2) == 0xFFFFFFFF) &amp;amp;&amp;amp; (*(checkIP+3) == 0xFFFFFFFF))&lt;/P&gt;&lt;P&gt;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; lastIp[0][0] = 66; lastIp[0][1] = 60; lastIp[0][2] = 22; lastIp[0][3] = 202; //IpServ por default: 66.60.22.202&lt;/P&gt;&lt;P&gt;&amp;nbsp; lastIp[1][0] = 192; lastIp[1][1] = 168; lastIp[1][2] = 1; lastIp[1][3] = 141; //IpFrdm por default 192.168.1.141&lt;/P&gt;&lt;P&gt;&amp;nbsp; lastIp[2][0] = 255; lastIp[2][1] = 255; lastIp[2][2] = 255; lastIp[2][3] = 0; //Mask por default: 255.255.255.0&lt;/P&gt;&lt;P&gt;&amp;nbsp; lastIp[3][0] = 192; lastIp[3][1] = 168; lastIp[3][2] = 1; lastIp[3][3] = 1; //gateway por default: 192.168.1.1&lt;/P&gt;&lt;P&gt;&amp;nbsp; guardarIPenFlash((uint8_t *)lastIp);&lt;/P&gt;&lt;P&gt;&amp;nbsp; tiempo_poleo = SNTP_POLL_SEC;&lt;/P&gt;&lt;P&gt;&amp;nbsp; guardarPolltimeEnFlash((uint8_t *)&amp;amp;tiempo_poleo);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; enviar_cadena("Paso IF",3);&lt;/P&gt;&lt;P&gt;&amp;nbsp; leerPolltimeDeFlash(&amp;amp;tiempo_poleo);&lt;/P&gt;&lt;P&gt;&amp;nbsp; leerIPdeFlash((uint8_t *)lastIp, (uint32_t *)lastIpaddr);&lt;/P&gt;&lt;P&gt;&amp;nbsp; ip_data.ip = lastIpaddr[1];&lt;/P&gt;&lt;P&gt;&amp;nbsp; ip_data.mask = lastIpaddr[2];&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt; ip_data.gateway = lastIpaddr[3];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ENET_get_mac_address(BSP_DEFAULT_ENET_DEVICE, ip_data.ip, mac_address); //Obtiene dirección MAC de un dispositivo no inicializado. La guarda en mac_address.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; enviar_cadena("Paso MAC",3);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ipcfg_init_device(BSP_DEFAULT_ENET_DEVICE, mac_address); //Initializes given enet device and associated ip interface&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; enviar_cadena("Paso init ip",3);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; _task_create(0, WATCHDOG_TASK, 0);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; ipcfg_unbind (BSP_DEFAULT_ENET_DEVICE);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; error = ipcfg_bind_dhcp_wait(BSP_DEFAULT_ENET_DEVICE,TRUE, &amp;amp;ip_data);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; //error = ipcfg_bind_staticip(BSP_DEFAULT_ENET_DEVICE, &amp;amp;ip_data);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; enviar_cadena("Paso ip bind",3);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; error =SNTP_init(HOSTNAME, SNTP_PRIORITY, SNTP_STACKSIZE, lastIpaddr[0], tiempo_poleo); //7 //crea un nuevo cliente sntp&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; if(error){&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; enviar_cadena("Error SNTP",3);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; itoa(error, (char *) estampa);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; enviar_cadena((char *)estampa, 2);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; enviar_cadena("Inicialización exitosa.",2);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; /**** FIN de inicialización de valores por default ****/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is anyone else having the same problem ? i dont get an error code , so could it be a problem of my router ? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jun 2016 15:30:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Hello-im-having-the-follwing-problem-using-my-FRDM-K64F-platform/m-p/517983#M16351</guid>
      <dc:creator>javierverde</dc:creator>
      <dc:date>2016-06-10T15:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Hello , im having the follwing problem using my FRDM K64F platform, Im developing a Gateway that synchronizes its RTC with an SNTP server.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Hello-im-having-the-follwing-problem-using-my-FRDM-K64F-platform/m-p/517984#M16352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hola Javier,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please let me know the MQX version you are using??&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;Soledad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2016 21:53:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Hello-im-having-the-follwing-problem-using-my-FRDM-K64F-platform/m-p/517984#M16352</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2016-06-14T21:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Hello , im having the follwing problem using my FRDM K64F platform, Im developing a Gateway that synchronizes its RTC with an SNTP server.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Hello-im-having-the-follwing-problem-using-my-FRDM-K64F-platform/m-p/517985#M16353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello , im using MQX 4.0 !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Javier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 12:34:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Hello-im-having-the-follwing-problem-using-my-FRDM-K64F-platform/m-p/517985#M16353</guid>
      <dc:creator>javierverde</dc:creator>
      <dc:date>2016-06-15T12:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Hello , im having the follwing problem using my FRDM K64F platform, Im developing a Gateway that synchronizes its RTC with an SNTP server.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Hello-im-having-the-follwing-problem-using-my-FRDM-K64F-platform/m-p/517986#M16354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Javier,&lt;/P&gt;&lt;P&gt;I have not used that specific API call.&lt;/P&gt;&lt;P&gt;I have in the past called SNTP_oneshot() successfully.&lt;/P&gt;&lt;P&gt;Attached is my relevant code from long time ago when I was playing with MQX3.7 or MQX3.8.&lt;/P&gt;&lt;P&gt;Generically it assumes good network connection and a known good NTP server IP address to use.&lt;/P&gt;&lt;P&gt;If the SNTP_oneshot() fails, then a default time is set.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 15:13:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Hello-im-having-the-follwing-problem-using-my-FRDM-K64F-platform/m-p/517986#M16354</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-06-15T15:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Hello , im having the follwing problem using my FRDM K64F platform, Im developing a Gateway that synchronizes its RTC with an SNTP server.</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Hello-im-having-the-follwing-problem-using-my-FRDM-K64F-platform/m-p/517987#M16355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i use this function , i do not have to use al the ip functions ? . This funcion also manages the configuration of the ip interface ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Javier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 17:35:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Hello-im-having-the-follwing-problem-using-my-FRDM-K64F-platform/m-p/517987#M16355</guid>
      <dc:creator>javierverde</dc:creator>
      <dc:date>2016-07-07T17:35:42Z</dc:date>
    </item>
  </channel>
</rss>

