Author Topic: 64bit / 32 bit Axon II bootloader (flasher) NOW AVAILABLE  (Read 14021 times)

0 Members and 1 Guest are viewing this topic.

Offline kl22Topic starter

  • Full Member
  • ***
  • Posts: 106
  • Helpful? 2
Re: 64bit / 32 bit Axon II bootloader (flasher) NOW AVAILABLE
« Reply #30 on: April 23, 2011, 06:24:34 PM »
Oh no way. Please instruct me on so I can implement it..:)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: 64bit / 32 bit Axon II bootloader (flasher) NOW AVAILABLE
« Reply #31 on: April 23, 2011, 06:41:46 PM »
In the users program (outside the bootloader), you need to first have this somewhere:
Code: [Select]
//turns off watchdog timer after reset
uint8_t mcusr_mirror __attribute__ ((section (".noinit")));

void disable_watchdog(void) \
  __attribute__((naked)) \
  __attribute__((section(".init3")));
void disable_watchdog(void)
{
mcusr_mirror = MCUSR;
MCUSR = 0;
wdt_disable();
}

Then to actually activate the reset, you need this in your user program:
Code: [Select]
if(uartGetByte(wireless_UART)='r')//the character 'r' is received
     wdt_enable(WDTO_250MS);//reset microcontroller

The trick however would be to get your bootloader software on the PC to send that 'r' command and run the bootloader right after with perfect timing.

Offline kl22Topic starter

  • Full Member
  • ***
  • Posts: 106
  • Helpful? 2
Re: 64bit / 32 bit Axon II bootloader (flasher) NOW AVAILABLE
« Reply #32 on: April 23, 2011, 11:06:07 PM »
Hey Admin,
Thanks admin! Thanks for the quick reply. Hard for me to do anything outside of the bootloader, but this might be a possible solution:


can we somehow standardize the code for bluetooth programming. So that we can do something like this:

User always implements a certain method (the one you mentioned)
public void checkBluetoothForProgramming() {
  if(uartGetByte(wireless_UART)='Peta' + 0xff + 'bt')//the character 'r' is received
       wdt_enable(WDTO_250MS);//reset microcontroller
       printf('Peta' + 0xff + 'reply'); //not correct, but just put here to give you an idea
  }
}

Maybe Webbot can implement this into his loop, in the future?

Also, instead of just 'r', something more non-generic similar to what the bootloader uses already 'Peta' + 0xff + 'bt', this way we can give users a specific code they need to check for when using bluetooth to program.Also, this method should also include some kind of special reply that would be something along the lines of   'Peta' + 0xff + 'replied', to notify my application that reset has been initiated. This would allow my app to switch to the programming mode. I'll dev something up and send it to Webbot for approval for implementation into his library.

(Note the check strings that can altered to any predefined strings)

This should be a temporary fix until the time comes when I decide to dev a new bootloader.
« Last Edit: April 23, 2011, 11:22:25 PM by kl22 »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: 64bit / 32 bit Axon II bootloader (flasher) NOW AVAILABLE
« Reply #33 on: April 24, 2011, 06:15:11 AM »
looks ok to me!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: 64bit / 32 bit Axon II bootloader (flasher) NOW AVAILABLE
« Reply #34 on: July 16, 2011, 01:17:49 PM »
Any updates on this?

 


Get Your Ad Here