bingo600, it definitely sounds like you are not getting a successful calibration, and that is most likely why the timing is off.
As kaweksl has already indicated, this is most likely because the free-pdk-examples currently require the 'development' branch of the easy-pdk-programmer-software for successful calibration. The calibration routines were changed compared to the previously released version (i.e. master).
You seem to have found the correct development branch, but it is unclear if you have actually re-complied the firmware and software. Both are needed. You can't just use the .dfu firmware from the development branch, as it hasn't been updated yet. And, the easypdkprog software needs to be re-compiled as well. You can't just use the previous 1.2 release.
When using the re-compiled .dfu firmware and the re-compiled easypdkprog you should get output like this (after running make program):
easypdkprog -n PFS154 write .output/BlinkLED_WithIRQ_PFS154.ihx
Erasing IC... done.
Writing IC (170 words)... done.
Calibrating IC
* IHRC SYSCLK=1000000Hz @ 4.00V ... calibration result: 997283Hz (0x84) done.
If you are not seeing those last two lines, something is off, and the IC is not properly calibrated.
If it still isn't working after making sure you are using re-compiled firmware and software, can you post the results of running make program so we can troubleshoot further?
Yesssss
Did a new Pull
Seems like Devel & Master has been "alligned"
I'm not a GIT Guru - is the below url correct for a "Git clone" , or should i have used some kind of tag to get devel ??
This devel
https://github.com/free-pdk/easy-pdk-programmer-software/tree/developmentHas this as git chekout (no devel in the name)
https://github.com/free-pdk/easy-pdk-programmer-software.gitWell
My git pull as of today @16:15
git pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 5 (delta 2), reused 5 (delta 2), pack-reused 0
Unpacking objects: 100% (5/5), done.
From https://github.com/free-pdk/easy-pdk-programmer-software
3a557cc..78983e5 master -> origin/master
be5ea01..78983e5 development -> origin/development
* [new tag] 1.3 -> 1.3
Updating 3a557cc..78983e5
Checking out files: 100% (153/153), done.
My Firmware make
arm-none-eabi-size build/EASYPDKPROG.elf
text data bss dec hex filename
33176 488 13088 46752 b6a0 build/EASYPDKPROG.elf
arm-none-eabi-objcopy -O binary -S build/EASYPDKPROG.elf build/EASYPDKPROG.bin
cp build/EASYPDKPROG.bin build/EASYPDKPROG.dfu
dfu-suffix -v 0483 -p df11 -a build/EASYPDKPROG.dfu
dfu-suffix (dfu-util) 0.9
Copyright 2011-2012 Stefan Schmidt, 2013-2014 Tormod Volden
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Suffix successfully added to file
My dfu programming
$ dfu-util -d 0483:df11 -a "@Internal Flash /0x08000000/064*0002Kg" --dfuse-address 0x08000000 -D EASYPDKPROG.dfudfu-util -d 0483:df11 -a "@Internal Flash /0x08000000/064*0002Kg" --dfuse-address 0x08000000 -D EASYPDKPROG.dfu
dfu-util 0.9
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuERROR, status = 10
dfuERROR, clearing status
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08000000, size = 33664
Download [=========================] 100% 33664 bytes
Download done.
File downloaded successfully
And Yipieee ..... Calibrating
$ make clean program
rm -r -f .build .output
sdcc -mpdk14 -c --std-sdcc11 --fverbose-asm --opt-code-size -DPFS154 -DF_CPU=1000000 -DTARGET_VDD_MV=4000 -I. -I../include -o .build/main.rel main.c
sdar -rc .build/lib.lib
sdcc -mpdk14 --out-fmt-ihx -o .output/BlinkLED_WithIRQ_PFS154.ihx .build/main.rel .build/lib.lib
makebin -p .output/BlinkLED_WithIRQ_PFS154.ihx .output/BlinkLED_WithIRQ_PFS154.bin
---------- Segments ----------
. .ABS. 00000000 00000000 = 0. bytes (ABS,CON)
. .ABS. 00000000 00000000 = 0. bytes (ABS,CON)
HEADER1 00000000 00000002 = 2. bytes (ABS,CON)
HEADER3 00000000 00000010 = 16. bytes (ABS,CON)
PREG2 00000000 00000002 = 2. bytes (ABS,CON)
RSEG0 00000000 00000002 = 2. bytes (ABS,CON)
DATA 00000002 00000015 = 21. bytes (REL,CON)
HOME 00000022 00000002 = 2. bytes (REL,CON)
GSINIT 00000024 00000014 = 20. bytes (REL,CON)
GSFINAL 00000038 00000002 = 2. bytes (REL,CON)
CODE 0000003A 00000124 = 292. bytes (REL,CON)
SSEG FFFFFFFF 00000001 = 1. bytes (REL,CON)
------------------------------
Size of BlinkLED_WithIRQ_PFS154.bin: 350 bytes
easypdkprog -n PFS154 write .output/BlinkLED_WithIRQ_PFS154.ihx
Erasing IC... done.
Writing IC (175 words)... done.
Calibrating IC
* IHRC SYSCLK=1000000Hz @ 4.00V ... calibration result: 997066Hz (0x84) done.
First time i ever saw Calibrating , when programming.
I have no idea what i did wrong , besides not specifying some magic git command on checkout.
And prob. being saved by master now updated to development.
A big thanx to @kaweksi and especially to @serisman for posting something usefull as the : Calibrating lines in the output.
And thanx Tim for sending me to "Lite programmers" , and to JS... for making the website & examples.
And to all the others contributing to this , and SDCC.
But what did i do wrong I never used the precompiled dfu , and made everything from source , even SDCC (That i in desparation now have installed in 3 versions , the 4.0 prebuilt , a Snapshot , and my own build from July-11) easy to switch if you use a symlink as the "Base dir".
Edit: easypdkprog still shows 1.2
$ easypdkprog -V
easypdkprog 1.2
/Bingo