Stuck on BOOT_ROM_START with WINC1500 and AT32UC3C1256C MCU

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've been working on developing the WINC1500 WiFi Module to work with the AT32UC3C1256C MCU on a custom PCB Board. 

The issue that I've been having is that is the firmware on the WiFi module won't boot and is stuck on a continuous loop. 

 

The IDE shows that the reg value is 0, so it goes into a continuous loop of trying to boot the firmware. If I put a breakpoint and set the reg value to 0x80000000, it will jump to the print out of "failed to load firmware from flash" and generate an error event. 

 

The WINC1500 Host driver code I am using in my project is the MLA driver from this link

http://ww1.microchip.com/downloads/en/AppNotes/Adding-an-ATWINC15x0-Wi-Fi-Network-Controller-to-a-Microcontroller-Application-Application-Note-DS00002907B.pdf

 

I've seen this thread on the forum below and tried out the solutions but had no luck. 

https://www.avrfreaks.net/comment/2806886

 

I've also tried the following

-Set the dummy byte to 0xFF (https://www.avrfreaks.net/forum/...)

-Triple checked that the CHIP_ENABLE AND WIFI_RESET Pins have been enabled with power to the pins, confirmed with a picoscope 

-Increased the m2m_get_elapsed_time(startTime) value above 100ms 

-Tried to write something then read it on the WiFi module which resulted in no values 

-Added _NM_BSP_BIG_END in the Toolchain options

 switch (GetBootRomState())
    {
        case BOOT_ROM_START:
            // if efuse loading done
            reg = nm_read_reg(0x1014);
					
            if (reg & 0x80000000)
            {
                reg = nm_read_reg(M2M_WAIT_FOR_HOST_REG) & 0x01;
                if (reg == 0)
                {
                    startTime = m2mStub_GetOneMsTimer();                    
                    SetBootRomState(BOOT_ROM_WAIT_LOAD);
                }
                else
                {
                    SetBootRomState(BOOT_ROM_CHECK_REV);
                }
            }
            break;
            
        case BOOT_ROM_WAIT_LOAD:
            reg = nm_read_reg(BOOTROM_REG);
            if (reg == M2M_FINISH_BOOT_ROM)
            {
                SetBootRomState(BOOT_ROM_CHECK_REV);
            }
            // else if timed out waiting (100ms) // 100
            else if (m2m_get_elapsed_time(startTime) > 100)    // // Modify this value to a higher timeout value if required
            {
                dprintf("failed to load firmware from flash.\r\n");
                GenerateErrorEvent(M2M_WIFI_BOOTROM_LOAD_FAIL_ERROR); 
                SetBootRomState(BOOT_ROM_FAIL);
            }
            break;

Debug log 

if (reg & 0x80000000)
regi= nm_read_reg(rNMI_GP_REG_1);
InitStateMachine()
INIT_WAIT_FOR_BOOT_ROM_STATE:
BOOT_ROM_START:
reg = nm_read_reg(M2M_WAIT_FOR_HOST_REG) & 0x01;
if (reg == 0)
startTime = m2mStub_GetOneMsTimer();
SetBootRomState(BOOT_ROM_WAIT_LOAD);
regi= nm_read_reg(rNMI_GP_REG_1);
InitStateMachine()
INIT_WAIT_FOR_BOOT_ROM_STATE:
BOOT_ROM_WAIT_LOAD:
if(reg == M2M_FINISH_BOOT_ROM)
m2m_get_elapsed_time(startTime) > 100)
Failed to load firmware from flash
GenerateErrorEvent
SetBootRomState(BOOT_ROM_FAIL);

Last Edited: Wed. Apr 22, 2020 - 10:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I know nothing about UC3 but as no one else has responded can I at least ask what the significance of 0x1014 is in this?

 

(It's probably not going to help your own code maintenance when you too come back to this then puzzle over what's at 0x1014 either! ;-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why have you posted this under "Atmel Studio" ?

 

Note that there's a specific forum for the WiFi parts:

 

https://community.atmel.com/forums/80211wi-fi

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I know nothing about UC3 but as no one else has responded can I at least ask what the significance of 0x1014 is in this?

 

(It's probably not going to help your own code maintenance when you too come back to this then puzzle over what's at 0x1014 either! ;-)

 

It was already inside the WINC1500 Driver code that the atmel team has written.