|
As far as I'm aware CMSIS doesn't really make that possible. It provides interfaces to the common cortex functionality (interrupts, debug, systick, base clocks), but any extra peripherals are completely different. The STM libraries extend CMSIS to give you access to the STM peripherals, but you couldn't switch to another manufacturers chip without rewriting all your peripheral code (or even switch between some STM families - the STM32F2 library is quite different to the STM32F1 library). This seems to be an issue with all arm chips. While the core is identical (so in theory code written for one cortex device should run on any cortex device), there aren't standards for peripherals, so every chip has to have it's own device libraries.
|
# ¿ Nov 19, 2012 11:30 |
|
|
# ¿ Apr 30, 2024 07:43 |
|
I'm not aware of any way you could multiplex the slave select pin (beyond switching between two devices on a single pin and using an inverter for one). SPI works by having a single device active if it's select pin is low, and if two devices were active you'd just end up with corrupt data. Regarding CMSIS - even if you did make UART0 on one chip match UART0 on another, I'd expect the internal registers to be incompatible as well, so you end up needing to rewrite most of the peripheral code. I guess it wouldn't be hard to write some standard functions to do this for switching between specific boards, but it's something you'd have to write rather than being included as part of CMSIS.
|
# ¿ Nov 26, 2012 18:06 |
|
Martytoof posted:Oh I hadn't even thought of that issue. That alone makes prescalers more sensible. Thanks! They can also be quite useful for making the counter / period values be in a certain unit (eg at 84mhz a prescaler of 84 means the counter will be in microseconds). We've got one of the 32 bit timers constantly running at this rate so the counter register can be directly used as a source for timestamps, and it avoids the overhead of having interrupts trigger to update variables. It can also be easier to understand a timer with a period of 1000 to trigger every millisecond instead of a period of 840000.
|
# ¿ Dec 11, 2012 15:10 |
|
STM provide IAP examples (http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257903), which accept code over USART, program it into flash and run it. You could modify this to use a different way of getting the data, and making it store the binary and then run from ram wouldn't be a problem either. It might work better than the built in thing.
|
# ¿ Jun 5, 2013 09:51 |
|
Kire posted:Has anybody ever used gdb for debugging a target from a host machine? I'm just curious, I learned about it in a class and it sounds complicated since gdb's command line interface gets very difficult to use very quickly, since terminals cannot display as much info as a GUI. So cross-debugging on a target seems really confusing, but kind of neat. If you don't like command line debugging, there are a lot of gui's that can use GDB as a backend (I use eclipse).
|
# ¿ Jun 18, 2013 09:40 |
|
Joda posted:Is there any way to avoid the redundancy, while also having the life span in the program memory? While not helpful for the more generic question, in this case couldn't you just set lifeTime to LIFE_SPAN in the constructorand decrement it in the update function and mark it as dead when it reaches 0?
|
# ¿ Jun 6, 2014 11:55 |
|
Slanderer posted:Wireshark on linux might support USB capture, so give that a try? There might be capture software for Windows too. There are also inline USB protocol analyzers and data loggers, but those can be expensive. Microsoft Message Analyzer is quite good (and free) for windows USB capture. There are a few libusb ports for windows (eg libusbK) that will let you send / recieve to USB endpoints without writing a driver, which might be a good way to get started. The first step should be connecting the device and getting the descriptors to see if it's going to be a standard usb class or a completely custom thing. USBView (either the microsoft version or the improved USBTreeView - http://www.uwe-sieber.de/usbtreeview_e.html#download) is good for this.
|
# ¿ May 6, 2015 19:44 |
|
|
# ¿ Apr 30, 2024 07:43 |
|
RICHUNCLEPENNYBAGS posted:I set up Microsoft Message Analyzer but I feel like kind of a dummy in that I can't figure out which USB traffic actually belongs to this device. But maybe that's not the right tack anyway. The best way I've found is to set a filter for the vendor / product id. In your case this would be: code:
|
# ¿ May 8, 2015 09:17 |