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.

Messages - xenon68

Pages: [1]
1
Discussion - Software / Writing a page to flash stops the SPI from working
« on: September 20, 2023, 08:25:21 PM »
Tools: Vinculum ii IDE
Chip: 32pin VNC2
Application size has plenty of flash left, only at 227000 bytes.

For some reason when I write a single page of flash, the SPI device stops working...  any ideas?

Basically this is all I am doing, then after that the SPI stops working. Tried other page locations.  What is odd, is the flash write works. I can restart, and read the correct data from the flash.

flash_writePage(0x7ff, temp_string);


2
Using the project FirmwareUpdateApp as an example in my code below. Using either the function FirmwareUpdateFATFileFeedback or FirmwareUpdateFATFile the both don't accept the ROM files.  I have used ROMs from my own projects and even the ROMs from install of Vinculum II IDE install 2.

First I have flashed the reflasher using:
VinPrg.exe ReflashFATFile.rom -o 0x1f000 -d "VII Debugger Module"

Then I run my application, select a ROM file that the linker has created and immediately returns from the FirmwareUpdateFATFileFeedback call.  The status is the ROM is invalid.

The return from the updating function is always FIRMWARE_UPDATE_INVALID_FILE.
Any suggestions what could be going wrong?


       file = fopen("FWUPDATE.ROM", "r");

   if (file == NULL)
   {
      puts1USART("@File not found@");
   }
   else
   {
      puts1USART("@Calling firmware update@");
      //#define REFLASHER_OFFSET 0x1f000
      //#define FEEDBACK       FIRMWARE_UPDATE_FEEDBACK_UART | FIRMWARE_UPDATE_FEEDBACK_GPIO_A2
      //status = FirmwareUpdateFATFileFeedback(file, REFLASHER_OFFSET, FEEDBACK);
      status = FirmwareUpdateFATFile(file, REFLASHER_OFFSET);
      
      if(status == FIRMWARE_UPDATE_INVALID_FILE) {
         puts1USART("@INVALID FILE@");
      }
      puts1USART("@Returned@");

      fclose(file);
   }

3
The VinL error L0013, although listed as an error in the AN_151 document does not provide any explanation of what the error means

(Debug\vnc2.obj) : (error) L0013 error in parameter section information

There is also a message "Error During Optimization", this is also not in the AN_151



4
I was getting error:
Assembler: Debug\cnc.asm line 5666: (error) A3015 value is greater than the operand size

in the assembler, but no way to actually determine where/what the error was.  There is no switch to enable a listing output from the assembler.  Reducing the amount of RAM used appears to have fixed there error, but I have no idea what amount of memory is being used by my code and the vnc2 libraries...

Is there a way to get the compiler/assembler/linker to output listings, or map information?  I don't see any switches to do that. There is a map that is produced, but it tells you nothing but what the chips capacity is...

After shrinking my RAM use to nothing, no I get this error:
(Debug\vnc2.obj) : (error) L0013 error in parameter section information

But no other output file to help diagnosis what this means...



5
I am going to assume the Vinculum IDE string.a has all the other functions. So just adding the missing functions to the Vinculum's string.h will work. So far the compiler has not errored with the changes. I will have to see once I complete porting my code from the eclipse IDE.

6
FTDI puts a copyright notice in their string.h, so they must feel some attachment to the code (see below from the FTDI string.h source)

/*
** string.h
**
** Copyright (C) 2009 Future Technolgy Devices International Limited
**
** Project: Tool Chain
** Module: VII Library
** Requires:
** Comments:
**
** History:
**  1  initial version
*/

7
I can't seem to find the standard function strstr

char *strstr(const char *haystack, const char *needle)

is this not a part of the FTDI string.h library?

8
In the V2DAP.c source, there is the IO configuration for the VINCULUM_II_32_PIN.  There is no code for using the 32pin device in the FIFO  " monInterface == FIFO"

The datasheet shows you can configure all the fifo data pins for bit0 to bit7.  As well as the 4 control lines.

In order to do this, d0 is configured to use pin 11 --->   vos_iomux_define_bidi(11, IOMUX_IN_FIFO_DATA_0, IOMUX_OUT_FIFO_DATA_0);
         
But the issue appears to be that the Debug pin is also using the pin 11 on the 32 pin VNC2. So when I run the code, the d0 line always stays high.   Is it possible to disable the debugger from using the pin 11 so that it can be configured as bit 0 of the FIFO?

This is how I have configured the 32pin device in the v2dap.c source:
vos_iomux_define_bidi(11, IOMUX_IN_FIFO_DATA_0, IOMUX_OUT_FIFO_DATA_0);
vos_iomux_define_bidi(12, IOMUX_IN_FIFO_DATA_1, IOMUX_OUT_FIFO_DATA_1);
vos_iomux_define_bidi(14, IOMUX_IN_FIFO_DATA_2, IOMUX_OUT_FIFO_DATA_2);
vos_iomux_define_bidi(15, IOMUX_IN_FIFO_DATA_3, IOMUX_OUT_FIFO_DATA_3);
vos_iomux_define_bidi(23, IOMUX_IN_FIFO_DATA_4, IOMUX_OUT_FIFO_DATA_4);
vos_iomux_define_bidi(24, IOMUX_IN_FIFO_DATA_5, IOMUX_OUT_FIFO_DATA_5);
vos_iomux_define_bidi(25, IOMUX_IN_FIFO_DATA_6, IOMUX_OUT_FIFO_DATA_6);
vos_iomux_define_bidi(26, IOMUX_IN_FIFO_DATA_7, IOMUX_OUT_FIFO_DATA_7);

// RXF# -> Pin 41
vos_iomux_define_output(29, IOMUX_OUT_FIFO_RXF_N);
// TXE# -> Pin 42
vos_iomux_define_output(30, IOMUX_OUT_FIFO_TXE_N);
// RD# -> Pin 43
vos_iomux_define_input(31, IOMUX_IN_FIFO_RD_N);
// WR -> Pin 44
vos_iomux_define_input(32, IOMUX_IN_FIFO_WR_N);


Pages: [1]