Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - chiaznal

2
Web platform / Re: Secondary Oscillator not running
Here's my working code
Code: [Select]
//------------------------------------------------------------------------------
// Timer 1 interrupt()
// Description: rtc timer
//------------------------------------------------------------------------------
void __attribute__((interrupt, auto_psv)) _T1Interrupt(void)
{
IFS0bits.T1IF = 0; //clear interrupt flag

++parameters.lSeconds;

// Toggle led 1
if ( LD1_O ) {
LD1_O = 0;
} else {
LD1_O = 1;
}
}//T1Interrupt()



//------------------------------------------------------------------------------
// Time_Init()
// Description: setup timers
//------------------------------------------------------------------------------
void __attribute__((section(".text"))) Time_Init()
{
// Timer 1 + 32kHz lp oscillator
__builtin_write_OSCCONL( 0x02 ); //enable low power oscillator
T1CON = 0; //reset control register
TMR1 = 0; //reset timer
T1CONbits.TCS = 1; //use external clock as source
T1CONbits.TCKPS = 3; //set prescale to 1:256
PR1 = 128; //set period register so we get interupt each second (32k / 256 / 128 = 1)
IPC0bits.T1IP = 1; //set interupt priority
IFS0bits.T1IF = 0; //clear interupt flag
IEC0bits.T1IE = 1; //enable interupt
T1CONbits.TON = 1; //turn on timer 1
}//Time_Init
3
Bus Pirate Development / Re: Higher serial speeds?
You want higher speeds? You got it ;) 

In bootloader firmware
Change the following lines (they already exists)
.equ    UARTBR,    0
;.error "Baudrate error is more than 3%. Remove this check or try another baudrate and/or clockspeed."
;bset   UMODE, #BRGH      ;enable BRGH

In GUI
Baud rate: 1000000

With the above settings, the entire flash is written in 6,9s on my pirate/computer.
4
General discussion / Forum feature request
Can you add some feature such as the spoiler tag so one can post large code snippets that isn't visible until you click a show button? I think it could be useful. I know it's available in vBullentin but I don't know about SMF.
7
Bus Pirate Development / Re: bootloader v4 console utility
Yes it has, in the new package on the homepage. But it also requires mono.

[quote author="ian"]
There is also a ds30 Loader console, but it hasn't been updated with the new features that were added for us.
[/quote]

The flowchart in firmware manual might be interesting for you.
8
Bus Pirate Development / Re: Bootloader v4 (ds30 Loader)
With a comm timeout of 1ms you'll never be able to initiate a download unless you use a rtos. Why do you want that low timeout?

One user wanted fast start of user application at boot (<30ms), he modified the bl to have separate timeouts for startup and comm.

100ms is probably a good balance between reliability and waiting. Dont forget to lower the polltime in the gui.
9
Bus Pirate Development / Re: Bootloader v4 (ds30 Loader)
Looks good. Here's a more generic version (maybe you switch to a bigger flash chip?).
You mean post increment? That makes sense.

#1 I believe the write will only occur in on the selected row even if you load the latches in another row.

Code: [Select]
		mov.b 	#0x04, W0
mov.b W0, [WBUFPTR++] ;upper byte

mov.b #(0xff & STARTADDR), W0
mov.b W0, [WBUFPTR++] ;low byte

mov.b #(0xff & (STARTADDR>>8)), W0
mov.b W0, [WBUFPTR++] ;high byte

mov.b #0x00, W0
mov.b W0, [WBUFPTR++] ;upper byte

mov.b #(0xff & (STARTADDR>>16)), W0
mov.b W0, [WBUFPTR++]  ;low byte

mov.b #0x00, W0
mov.b W0, [WBUFPTR++]  ;high byte
10
Bus Pirate Development / Re: Bootloader v4 (ds30 Loader)
Lol, hope you loke the new gui Sjaak :)

Yeah thats what has probably happened. Here's a few thoughts:

* The gui doesn't erase pages that is not found in the hex file, option to add?
* settings.xml should be write protected?
* Don't let the gui start if settings.xml is absent?
* Let the bootloader set the 0x00 goto itself when it detects a write to row 0?

edit: I really like that expression, to NOP. Maybe it could be use irl also: "I was noping  at work today" =)
13
Bus Pirate Development / Re: Bootloader v4 (ds30 Loader)
Good work finding the problem Ian!

Sjaak: "...But during flashing the app crashed (I think only the GUI, because the USB led was still flashing during the popup) I forgot the write down the error because i was scared. Second try it didn't crashed. I really like the app btw!"
The ds30 Loader GUI crashed during download? Did you have debug mode enabled? If so, do you know what was going on at the moment of the crash (unhandled exception)?

Did anyone else experience crash of the ds30 Loader GUI?
14
Bus Pirate Development / Re: Bootloader v4 (ds30 Loader)
It was not only fun, I learned a few thing about VS and .NET from Alex, thanks!
Where you from Alex? I'd like to add you to my contributors list on the homepage
for the gui code.

Hope I get my pirate soon so I can test to :)
15
Bus Pirate Development / Re: Bootloader v4 (ds30 Loader)
Sorry for the choppy and buggy development. I have a lot of open "support cases" at the moment, at the
same time I've done some major rework of the code in the engine. I have reduced code by approx 30%.
A lot of the hex parsing and writing code is common for most firmwares...

Here's a new version that I hope will be the next official release:
http://mrmackey.no-ip.org/elektronik/ds ... loader.zip
https://mrmackey.no-ip.org:444/svn/ds30 ... k/pc-side/

(The old version should be good enough for alpha testing)
This time you beat me to it, you replied while I was typing :)

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01572448976session_write_close ( )...(null):0
20.01602580544ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01602581320Database_MySQL->query( ).../DatabaseHandler.php:119
40.05802720032Database_MySQL->error( ).../Db-mysql.class.php:273