Closed GoogleCodeExporter closed 9 years ago
It would be helpful if you'd said what parts you've got, there are many
different chips in the STM32 family.
Original comment by mishg...@gmail.com
on 29 Jul 2011 at 1:13
Yes, sorry.
This is with STM32F103RBT6 parts. Both are Revision B devices. They are mounted
o an IAR STM32-SK board and an Olimex STM32-P103 board.
Original comment by micromou...@gmail.com
on 29 Jul 2011 at 6:51
That's very odd. I can't see any mention of any parts- and least of all the
F103, returning a PID in anything other than two bytes.
Sorry if I'm being thick, but "built the tool on a mc"? What's an mc?
And to double check, there's something else missing from your report, which is
what command you ran. I'd rather not guess. Remember that no-one is watching
what you do, so if you don't spell it out, they'll never know. If you've ever
had problems getting people to help you before, this is probably why- don't
make the internet work any harder than it has to- I for one am pretty lazy when
I'm not being paid :)
Can you replace the line:
fprintf(stderr, "More than two bytes sent in the PID, unknown/unsupported device\n");
with
fprintf(stderr, "More than two bytes sent in the PID (0x%02x), unknown/unsupported device\n", len);
in stm32.c and recompile, re-run it, and let me know what it says?
Original comment by mishg...@gmail.com
on 30 Jul 2011 at 2:40
Apologies for the delay. I am on and off holidays at the moment.
My message should have read built on a mac ( OS X Snow Leopard 10.6 - 64 bit)
rather than mc. Typing is not one of my best talents.
The command line is simply:
to try and ascertain the device identity.
After replacing the line you suggest, the output returns:
"More than two bytes sent in the PID (0x04), unknown/unsupported device"
Original comment by micromou...@gmail.com
on 12 Aug 2011 at 9:58
Hi,
i found out that the medium-density performance line of the stm32 takes up to 4
bytes of PID.
I currently using the STM32F103x with PID 0x06410041, so for a quickand dirty
fix you can add this line to the devices table
{0x641, "Medium_Density Performance Line" , 0x20000200, 0x00005000, 0x08000000,
0x08020000, 4, 1024, 0x1FFFF800, 0x1FFFF80F, 0x1FFFF000, 0x1FFFF800},
and dump the additional two bytes:
/* get the device ID */
if (!stm32_send_command(stm, stm->cmd->gid)) {
stm32_close(stm);
return NULL;
}
len = stm32_read_byte(stm) + 1;
if (len != 2) {
//stm32_close(stm);
fprintf(stderr, "More then two bytes sent in the PID (0x%02x), unknown/unsupported device\n",len);
//return NULL;
}
stm->pid = (stm32_read_byte(stm) << 8) | stm32_read_byte(stm);
fprintf(stderr, "Read PID: 0x%04x\n",stm->pid);
uint8_t dump1 = stm32_read_byte(stm);
uint8_t dump2 = stm32_read_byte(stm);
fprintf(stderr, "Dumped 2 bytes: 0x%02x 0x%02x\n", dump1,dump2);
if (stm32_read_byte(stm) != STM32_ACK) {
stm32_close(stm);
fprintf(stderr, "no ACK\n");
return NULL;
} else fprintf(stderr, "Read ACK\n");
Original comment by kubi...@informatik.hu-berlin.de
on 13 Dec 2011 at 3:05
Attachments:
In absence of the maintainer, I have set up a git repository where I will try
to incorporate all outstanding patches:
https://gitorious.org/stm32flash/stm32flash#more
I made an alternative patch for this issue, in the "issue10" branch. It would
be nice if you could verify that it works on this device.
Original comment by lists.to...@gmail.com
on 17 Nov 2012 at 8:38
This has now been fixed in the official repository and is included in version
0.3beta2.
Original comment by lists.to...@gmail.com
on 9 Dec 2013 at 11:09
Original issue reported on code.google.com by
micromou...@gmail.com
on 27 Jul 2011 at 12:01