Forum : ST7/STM8
Original Post
Post Information | Post |
---|---|
January 22, 2010 - 12:15pm
|
Hi, Nicola |
Forum : ST7/STM8
Post Information | Post |
---|---|
January 22, 2010 - 12:15pm
|
Hi, Nicola |
Hi Nicola,
What do you mean by "the modules don't work"?
Just try this:
Compile, run, it just works!
I hope this helps,
Bruno
Hi Bruno,
thanks for your reply.
Your code compiles and works but mine do not run properly. I mean that it compiles and runs but it doesn't write on UART.
If I remove the float variable it works.
Can I send you a copy of my code?
Thanks
Nicola
Hi Nicola,
Sure you can send the faulty project (with application files and sources) in a zip to for investigation.
Concerning STM8S-Discovery printf/putchar issues:
The STM8S105 has a different UART than the other STM8S. It uses UART2 (address 0x5240), not UART1 (address 0x5230). The putchar offered by default in RKit-STM8 is based on UART1, so the putchar/puts/printf functions do not work correctly.
If this is the problem you are encountering, just add the following assembly file in your project. It will define a STM8S105-specific UART, hence putchar/printf will work fine with your STM8S-Discovery.
Note: This will be corrected in the next RKit-STM8 version (it will automatically link this putchar version with STM8S105), but the release should not be before March. Using this file in your project is the best workaround in the meantime.
I hope this helps. Please come back to us if needed.
Bruno
Hi Nicola,
We received your project, but have not been able to use it.
Can you describe precisely the problem you are encountering?
If you use the assembler-written putchar, disable the clock settings in your project, does your printf work?
If it does, do you have a difference when enabling the float initialization routine?
I would be surprised if that made any difference, but you never know.
Keep us informed about what happens to your project.
Regards,
Bruno