FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Topics - TylerTiede

Pages: [1]
1
Discussion - Software / VNC2 Firmware Update Fail safe
« on: September 21, 2018, 04:40:00 PM »
When updating the VNC2 over USB, is there any way of having a fail safe if the USB device is unplugged mid flash? I know some of the application code would have been written over by then, but is there any way to have the device continue flashing if replugging the device in? For example, have a split image setup, where a second image only includes looking for the usb.

Tyler

2
Discussion - Software / VNC2 Debugger Issue
« on: June 01, 2018, 08:00:50 PM »
Hello,

I cannot connect to my VNC2 device after a firmware update using the V2Debug and the Vinculum 2 IDE. I am using the write flash commands in my code. After stopping the debugger and trying to reconnect to the device (hitting the play icon) it tells me the firmware has changed and needs to be reflashed. I hit yes, and then I receive the following lines in the message window

Flashing 248236 bytes

Invalid program loader.

Failed to program device.

Failed to flash device.


When I go to see connectable devices, it disappears and I cannot discover it ever again. Is my device bricked? Is there a way to get my V2Debug to see my chip again? I tried flashing the same firmware on another device, and i experienced the same issues after.

Tyler

3
Discussion - Software / VNC2 Firmware Update over USB
« on: May 03, 2018, 07:25:18 PM »
Hello Everyone,

I am using the VNC2 chip on a custom board. I have successfully implemented the firmware update and reflasher rom onto the board (the firmware update app code is given below). I have a customer I send updates to regularly, but we have run into a problem where the firmware update will not work occasionally. We have narrowed it down to the call:
       file = fopen("FWUPDATE.ROM", "r");

This command won't open the file because there is not enough heap space left. We believe this to be the case due to it working after reducing a couple stack sizes on our threads. Is there a way to allocate the heap space on startup for the fopen command? Is there a way to separate the firmware update over USB completely from the application code (ie on bootup it selects between update or app code)?

My understanding is when using firmware updates, the ROM size is cut in half. One half is for the current loaded ROM, and the other half is to upload the new firmware. This observation is based on the offset used when flashing the reflasher ROM following AN_159. Is there a way to limit the size of my app ROM file, and if so what is the max ROM file size before the reflasher code gets overwritten? I have also had the problem of my ROM being too large and overwriting the reflasher code. 

void Firmware_Update(void){
   unsigned char status;
   usbhost_device_handle_ex ifDev;
   usbhost_ioctl_cb_t hc_iocb;
   usbhost_ioctl_cb_class_t hc_iocb_class;
   // BOMS device variables
   msi_ioctl_cb_t boms_iocb;
   boms_ioctl_cb_attach_t boms_att;
   // FAT file system variables
   fat_ioctl_cb_t fat_ioctl;
   fatdrv_ioctl_cb_attach_t fat_att;
   FILE *file;
   hBOMS = boms_attach(hUSBHOST_1, VOS_DEV_BOMS);

         if (hBOMS == NULL)
         {
            
         }
         else
         {
            hFAT_FILE_SYSTEM = fat_attach(hBOMS, VOS_DEV_FAT_FILE_SYSTEM);

            if (hFAT_FILE_SYSTEM == NULL)
            {
         
            }
            else
            {
               // lastly attach the stdio file system to the FAT file system
               fsAttach(hFAT_FILE_SYSTEM);

               // now call the stdio runtime functions
            problem---->   file = fopen("FWUPDATE.ROM", "r");

               if (file == NULL)
               {
         
               }
               else
               {
            
                  //printf("Calling firmware update\n");
         
                  status = FirmwareUpdateFATFile(file, REFLASHER_OFFSET);

                  //printf("Returned %d\n", status);

                  fclose(file);
               }

               fat_ioctl.ioctl_code = FAT_IOCTL_FS_DETACH;

               vos_dev_ioctl(hFAT_FILE_SYSTEM, &fat_ioctl);
               vos_dev_close(hFAT_FILE_SYSTEM);
            }

            boms_iocb.ioctl_code = MSI_IOCTL_BOMS_DETACH;

            vos_dev_ioctl(hBOMS, &boms_iocb);
            vos_dev_close(hBOMS);
         }
}

Pages: [1]