This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Simulate GPIO inputs STM32F4

I had success executing (in simulation mode) a project in Keil uvision 5 for stm32f1xx that read the status of some input, which could be modified with a mouse click.

However, I am trying the same with stm32f4 (f407, f411 or f429) and I don't get it.

The checkboxes of the inputs do not appear. And the GPIOx-> IDR checkboxes are disabled for modification.

Has anyone got it? Thank you

  • Simple, low-cost development boards with built-in debugger are widely available for these chips - "Nucleo" and "Discovery".

    So why bother messing about with simulators - which may or may not (fully) support any/all  features - when you can easily & cheaply use real hardware?

    See also:

    https://community.arm.com/developer/tools-software/tools/f/keil-forum/43684/lpc2148-timer0-not-working-as-expected/158931#158931

  • I think the STM32F2/4 era is when Keil basically gave up providing system level simulation as the number of MCU designs exploded, and the cost/resources for building them could not be sustained.

    If you want full simulation you might want to look at earlier MCU where they went to town on the peripheral side simulation.

    Cheap actual hardware, with debugger, run $10 USD at this point, so represents the best choice when doing real work.

  • the cost/resources for building them could not be sustained

    especially with the availability of the $10 debugger-equipped dev boards - which significantly reduce the benefit of simulation.

  • Thank you Andy and Pier. 

    If it were only for me, I would not find any advantage about simulating instead of debugging. The reason for prefering simulating is for my classes, because I hardly can expect that two or three of my students will buy any hardware (even if it only costs 10 €). However, I can force to test their exercises if they have a free simulator. 

  • But they're going to need hardware sooner or later anyhow - otherwise you might as well just teach them programming on a desktop!

    I had success executing (in simulation mode) a project in Keil uvision 5 for stm32f1xx

    Then you're just going to have to stick to that as your target for simulation.

    Or look through to see what other chips have the level of simulation you want.

    Have you looked to see if ST (or other manufacturers) have anything specific for their chips?

  • Thank you Neil

    My subject is related to programming microcontrollers, not microprocessors. This past year we have just stopped programming 8051, and this new year we are beginning with 32 bits which are more related to the current trend. If I do the effort of completely changing the subject, I don't want to include something that it is a bit obsolete, even if cortex-M3 micros completely satisfy our programming requirements (new 8051 micros also did): basic programming, arrays, loops, interruptions, timers and serial comm.

    We have already bought 12 nucleo stm32f411, and even if our department can afford to buy another 12 kits, and even if I cannot simulate their inputs, I think it can be a good choice. 

    I somewhat should agree with you, but, with a little luck, 10% of my students will not burn their notes of my subject after passing it. I have learnt (a bit of) STM32 by debugging instead of simulating, but I definitely know that I only can force my student to work with real hardware at my practical classes , but not at home.

    Thank you again for your advices, Neil. It is not a big drawback to simulate one chip and make practical classes with another.