Jump to content
43oh

spirilis

Members
  • Content Count

    3,399
  • Joined

  • Last visited

  • Days Won

    146

Reputation Activity

  1. Like
    spirilis reacted to Rei Vilo in RP2040 - The Raspberry Pi Pico   
    Forget the Arduino IDE! I would recommend using Visual Studio Code with the C/C++, Arduino and Cortex-Debug extensions.
    The Raspberry Pi Pico acting as programmer-debugger is called Picoprobe. It also features redirection of the Serial1 port.
    The installation process is detailed at the earlephilhower/arduino-pico page. You may need to build OpenOCD with specific options. It is easy and works fine.
    Debugging is performed from Visual Studio Code. Obviously, you can use manual command-line GDB and OpenOCD. The only caveat is Serial1 should be used instead of Serial to print to the console.
    Please find some pointers below.
     
    References:
    https://code.visualstudio.com https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug  https://github.com/earlephilhower/arduino-pico#debugging-with-picoprobepico-debug-openocd-and-gdb https://github.com/raspberrypi/openocd https://embeddedcomputing.weebly.com/raspberry-pi-pico-rp2040-board.html https://embeddedcomputing.weebly.com/debugging-against-the-pico-board.html
  2. Like
    spirilis reacted to Rei Vilo in RP2040 - The Raspberry Pi Pico   
    At USD4 apiece, you can use the second Raspberry Pi Pico as a programmer-debugger. It works really well!

  3. Like
    spirilis reacted to Rei Vilo in RP2040 - The Raspberry Pi Pico   
    Thank you for the pointer to the Challenger RP2040. It is nice to see the designers refrained from reinventing the wheel and took the Feather form-factor. Same for the LTE (SARA-R410M) or the WiFi radio (ESP8265).
    The Raspberry Pi Pico RP2040 is a very good board and I strongly recommend the Earle Philower's Pico core for Arduino over the official Arduino mbed-based implementation.
    There is a whole eco-system built around the Raspberry Pi Pico with many interesting kits. Let's me mention the E-Paper Display Pico Kit (EPDK), an all-in-one e-paper kit from Pervasive Displays.
     
  4. Like
    spirilis got a reaction from chicken in Printed TI manuals - underrated IMO   
    I decided "for the hell of it" to print out the MSP430 chip family User's Guide, all 676 pages of it (slau445).  Total cost was ~$70 altogether including the $10 binder from Staples.  I used bestvaluecopy.com for the printing - printed in B&W, with a thicker color cover sheet, 3-hole drilled, shrink-wrapped, and put it in my own binder.
    Reading the more esoteric parts of the book - like the PMM, SVS and CS systems - is actually much nicer in print I found.  Just more comfortable to sit down at the table and *look* at the diagrams and text and hold my left hand under the page with the schematic/diagram while reading the details & refer back and forth.  Underrated way to consume these documents IMO.  I need to get some sticky notes or small sticky tabs (dunno why I didn't think to buy them when I was at Staples) to bookmark the important chapters (eUSCI peripherals, etc).
    The BestValueCopy order was $37.31 for the book (676p double-sided), $19.88 for shipping, then the Staples 400-page binder was ~$12 with tax IIRC.  For the smaller documents like the per-chip datasheet, I might have them do a comb-binding or similar.  Only issue is that shipping cost.  So I need to compare that with local services like staples or fedex kinkos..


  5. Like
    spirilis got a reaction from MichelKohler in PWM changes depending on the code it's running   
    Ok:
    #include <wiring_private.h> void setup() { // put your setup code here, to run once: pinMode(PF_0, OUTPUT); } void loop() { // put your main code here, to run repeatedly: PWMWrite(PF_0, 256, 200, 15000); while(1) delay(100); } Saleae Logic16 shows a waveform with width=52.1uS, period=66.68uS, frequency = 14.997KHz.  Pretty close.  52.1/66.68 = 0.781343, 256*0.781343 = 200.02 so that looks right.
     
    Running this:
    #include <wiring_private.h> void setup() { // put your setup code here, to run once: pinMode(PF_0, OUTPUT); } void loop() { // put your main code here, to run repeatedly: PWMWrite(PF_0, 256, 200, 15000); delay(100); } ...produces ALMOST the same thing, but every 100ms there's a single pulse whose width is 101.65uS instead of the typical 52.1uS.
     
    Running this:
    #include <wiring_private.h> void setup() { // put your setup code here, to run once: pinMode(PF_0, OUTPUT); } void loop() { // put your main code here, to run repeatedly: PWMWrite(PF_0, 256, 200, 15000); } Produces no waveform at all; the signal goes HIGH after Energia starts and then stays there with no transitions.
  6. Like
    spirilis reacted to Rei Vilo in J-Link EDU Mini at USD18   
    Although all the LaunchPads feature a programmer-debugger, sometimes an external one might be useful.
    Segger has just launched the J-Link EDU Mini, with all the software and expertise of Segger, priced at just USD18!

    I'm very happy with the larger Segger J-Link Edu priced at USD60.
    I've ordered one J-Link EDU Mini and plan to review it.
     
  7. Like
    spirilis reacted to agaelema in Compiling CMSIS DSPLIB to MSP432 (and other cortex M4 from TI)   
    Hi @spirilis
    I'm not a specialist, but traditionally designers use tools like Matlab to select coefficients and test. If I'm not wrong, the CMSIS coefficients were calculated using matlab (providing the code).
    Octave is a free tool with same syntax and similar functions. 
    This link show an example using matlab/octave
    https://www.allaboutcircuits.com/technical-articles/design-of-fir-filters-design-octave-matlab/ https://www.allaboutcircuits.com/technical-articles/practical-fir-filter-design-part-2-implement-filter/
    Bellow there are some links to tools (but I have not tested)
    http://t-filter.engineerjs.com/ http://engineerjs.com/?sidebar=docs/iir.html http://iowahills.com/Index.html  
  8. Like
    spirilis reacted to agaelema in Compiling CMSIS DSPLIB to MSP432 (and other cortex M4 from TI)   
    Hi.
    In the beginning of this year I wrote two articles showing how to compile the CMSIS DSPLIB to use in MSP432 and one example of use.
    The sequence is very similar to used in Stellaris and Tiva line.
    The articles are in portuguese, but there is a embedded translator.
    Compiling the CMSIS DSPLIB to MSP432
    Example of use - FIR filter
    I hope it's useful. 
     

  9. Like
    spirilis reacted to admirlk in Is it just me ?   
    I know this is an older post, but it struck a "pet peeve" nerve.
    I recently went back to school, I had to learn how to use a calculator because they were not allowed in math class when I was in high school, and was surprised at how often people did not bother to even copy things by hand. When we had peer reviews, or otherwise were able to see each other's code, there was always at least one that was a direct c&p of code that did not even work. Had they copied it by hand, and read it in the process, they would have realized that it did not work. Keep in mind, these are simple school problems that have numerous examples on the internet. I have also seen, many times, where the code seems to have been intentionally written wrong, but someone who actually reads it will be able to fix it easily.
    When I have problems with code, I am often reluctant to ask questions because I do not want someone to just write it for me. I appreciate answers that simply point me in the right direction. On the other hand, with electronics, I tend to look for a more definitive answer. This is usually something like what size cap should I use, because I am trying to copy something that did not give the value, and I am just trying to get it to work, without ordering "one of each" or frying something.
    Personally, I appreciate everyone who tries to help me. 
  10. Like
    spirilis got a reaction from Medsimo in [Energia Library] RF430CL - TI NFC RF430CL330H library   
    Allocate an NDEF_TXT object first instead of just composing your "Value" variable and trying to send it directly over the NFC:
    NDEF_TXT t("es", Value.c_str()); int ndef_size = t.sendTo(nfc); nfc.setDataLength(ndef_size) Note the first string in the NDEF_TXT constructor is the language code describing the language used for the text.
  11. Like
    spirilis reacted to Rei Vilo in [Energia Library] RF430CL - TI NFC RF430CL330H library   
    So unfortunately, don't expect others to do your homework. Instead, they may provide you pointers. 
    See Netiquette for Newbies. 
  12. Like
    spirilis reacted to nickds1 in More C versus C++   
    Late into this thread, and I haven't read it top to bottom, but there seems to be a slight conceptual gap developing regarding what C & C++ really are.
    They are languages, not environments. The C language was originally designed for telephone exchange testing & control. Subsequently, it was used to implement the early UNIX kernels. There is a "C Standard Library", which is distinct from the language proper - this is where printf etc. come from.
    The story is similar with C++ - the language is distinct from its support libraries, e.g. stdlib, STL, and the various boost libraries.
    A huge amount of apocrypha and mis-information surrounds these languages and the pros and cons of their various implementations - most of the arguments are bogus and ill-informed. The truth is, IMHO, far more boring - that they each have pluses and minuses.
    The main differences are that C++ is geared to a more object-orientated design methodology, and generally, the mindsets used are different, which is why some feel that teaching people C, then C++ is a bad plan.
    When mis-used, C++ can be memory-hungry, which is one some decry its use for embedded work - I feel that this is a fallacy - C++ is absolutely fine for embedded work (I use it all the time), if you understand the consequences of your actions - C++ is a far more powerful & capable language than C, but with great power comes great responsibility (*) - blaming the language for your poor understanding of the consequences of your actions is not an excuse. C++ is easy to abuse, C can be plain dangerous...
    An analogy I like to use is the difference between "mathematicians" and "people who do mathematics".
    A mathematician has an intuitive grasp of numbers and mathematics - they can visualize the problem they are working on and come up with novel ways of solving it; further, when presented with a left-field/previously unseen problem, they will see ways of dealing with and solving that.
    Someone who does maths, OTOH, knows how to follow rules and can solve problems that are related to problems that they have encountered before, but may have real issues dealing with a novel puzzle..
    Same with programmers. There's a world of people who can do C or C++ and have used the support libraries - that does not make them good or even half-decent programmers.
    In my career, I have found very very few genuinely good programmers - people who understand architectural issues, who can see solutions, who can visualise novel approaches and solutions, who understand and then, very importantly, can implement with excellence - it's the difference between a programmer (rare beast), and journeymen who know how to program (common as anything).. 
     
    Note: I was involved in the ANSI C process and have been an editor or cited as a contributor to various C++ related books, including Scott Meyers' "Effective STL" etc Spent 30 years in the City of London and elsewhere as a CTO, designing, developing and implementing some of the world's largest real-time equity, derivative & FX exchange trading systems, mostly in C & C++.
    (*) Attributed to Ben Parker, Peter Parker's uncle...
  13. Like
    spirilis reacted to bluehash in Atomo Modular Electronics System - Raspberry-pi   
    Cool concept to adding boards to the Raspberry Pi.
    Atomo is a complete system for building electronic things with four parts: Control, IO, Power, and Connector. 
    https://www.indiegogo.com/projects/atomo-modular-electronics-system-arduino--2#/
    https://youtu.be/0uOsLvB1of0
     
     
     
  14. Like
    spirilis got a reaction from 43two in [Energia Library] Nordic nRF24L01+ library   
    Going to roll this up (with examples in the examples/ subdir, create the IDE hints, etc) and put it up on github shortly.
     
    This library is not the most flexible way to manipulate the transceiver, as it makes a few simple assumptions:
     
    1. Dynamic Payload Length is always enabled
    2. Only 1 receive pipe is supported, the MultiCeiver stuff is not (truth is, it's extensible enough that I could add that in the future)
    3. Pipe#0 is always using its default (E7E7E7E7E7) address and any data coming in to that addr gets silently flushed.  I recommend not using the E7E7E7E7E7 address for any of your applications.  (This internally has to do with implementing AutoACK properly)
    4. User needs to poll available() to see if incoming data is waiting, there are no ISRs that callback/wake-up the MSP430 in the event that data is available.
     
    The goal here is simplicity, in keeping with the spirit of Energia.  I think this will fulfill that and give users a quick & simple way to use their radios.
     
    Ideally I'd like to implement ISR/IRQ wakeup so the user can put the chip into deep LPM4 sleep, but it looks like the Energia/Arduino API just doesn't facilitate that.  I'd like to be able to attach an interrupt function to the IRQ pin so if it fires, it wakes the chip up, but I'd need some API in attachInterrupt() that tells it to do this (i.e. perform the __bic_SR_register_on_exit(LPM4_bits) in the main P1/P2 ISR function).  Rick tossed some ideas around with me and I'm just going to hold off on implementing any of that.
  15. Like
    spirilis got a reaction from 43two in [Energia Library] Nordic nRF24L01+ library   
    Hi folks... So I'm a little new to Energia, but since I wrote a library for the nRF24L01+ digital transceivers for native C-based apps I figured it'd be a great idea to port this to Energia.
     
    I'm rewriting it from scratch, trying to make it simpler & feel more like a native C++ energia lib.
     
    edit: This has been written and the latest version is up on Github.
    Github project- https://github.com/spirilis/Enrf24
    Latest version + comments- http://forum.43oh.com/topic/3237-energia-library-nordic-nrf24l01-library/?p=48805
     
     
     
     
    To that end, I'd like some feedback on the API choices I've made.  I want to know what some of you guys think should go in here.
     
    For now, here's an example of my "Nrf24.h" class definition (public's only, I haven't drafted the private's and probably won't until I really start writing the code):
    class Nrf24 { public: Nrf24(uint8_t cePin, uint8_t csnPin, uint8_t irqPin); void begin(); // Defaults used void begin(uint32_t datarate); // Specify bitrate void begin(uint32_t datarate, uint8_t channel); // Specify bitrate & channel void end(); // Shut it off, clear the library's state // I/O boolean available(); // Check if incoming data is ready to be read boolean write(void *buf, uint8_t len); /* Send packet, return true/false for autoACK * (true always if autoACK disabled or 250Kbps rate used) */ uint8_t read(void *inbuf); // Read contents of RX buffer, return length uint8_t read(void *inbuf, uint8_t maxlen); // Read contents of RX buffer up to 'maxlen' bytes, return final length. void autoAck(boolean onoff); // Enable/disable auto-acknowledgements (enabled by default) // Power-state related stuff- void deepsleep(); // Enter POWERDOWN mode, ~0.9uA power consumption void enableRX(); // Enter PRX mode (~14mA) void disableRX(); /* Disable PRX mode (PRIM_RX bit in CONFIG register) * Note this won't necessarily push the transceiver into deep sleep, but rather * an idle standby mode where its internal oscillators are ready & running but * the RF transceiver PLL is disabled. ~26uA power consumption. */ // Custom tweaks to RF parameters, packet parameters void setChannel(uint8_t channel); void setTXpower(int8_t dBm); // Only a few values supported by this (0, -6, -12, -18 dBm) void setSpeed(uint32_t rfspeed); void setCRC(boolean onoff, boolean crc16bit); /* Enable/disable CRC usage inside nRF24's hardware packet engine, * specify 8 or 16-bit CRC. */ // Protocol addressing -- receive, transmit addresses void setAddressLength(uint8_t len); // Valid parameters = 3, 4 or 5. Defaults to 5. void setRXaddress(uint8_t *rxaddr); // 3-5 byte RX address loaded into pipe#1 void setTXaddress(uint8_t *txaddr); // 3-5 byte TX address loaded into TXaddr register // Miscellaneous feature boolean rfSignalDetected(); /* Read RPD register to determine if transceiver has presently detected an RF signal * of -64dBm or greater. Only works in PRX (enableRX()) mode. */ } What do you think?  General usage would be to instantiate an Nrf24 object in the global, use begin() to start it and specify some custom params (data rate, or data rate & channel), then the transceiver is just sitting there idle until you either transmit (with setTXaddress() + write()) or enable RX mode with setRXaddress() + enableRX() and poll the available() function periodically.
     
    One thing I haven't worked out yet is how to implement the IRQ feature with Energia.  The nRF24 has an IRQ pin that is best hooked up for optimal function.  Can the library just use attachInterrupt() on the irqPin value that the user passes up top?
  16. Like
    spirilis got a reaction from dubnet in MCU recommendation   
    Well, I am not sure about the interrupt latency (not that familiar with the arch), and the price is more like $1.50ish... but Renesas RL78/G13 is close:
     
    https://www.renesas.com/en-us/products/microcontrollers-microprocessors/rl78/rl78g1x/rl78g13.html
     
    https://products.avnet.com/shop/en/ProductDisplay?storeId=715839035&catalogId=10001&langId=-1&productId=3074457345625366633
     
    OK, going down a bit, RL78/G12 has a 24MHz part that's <$1:
    https://www.renesas.com/en-us/products/microcontrollers-microprocessors/rl78/rl78g1x/rl78g12.html?status=No%3B&pin_count=20%3A20%3B#
     
    https://products.avnet.com/shop/ProductDisplay?catalogId=10001&langId=-1&storeId=715839035&productId=3074457345625120989&categoryId=&fromPage=autoSuggest
     
    IIRC the compiler is free, or at least there is a GCC port, and Renesas e2studio is a free Eclipse-based IDE.
  17. Like
    spirilis got a reaction from RobG in MCU recommendation   
    Well, I am not sure about the interrupt latency (not that familiar with the arch), and the price is more like $1.50ish... but Renesas RL78/G13 is close:
     
    https://www.renesas.com/en-us/products/microcontrollers-microprocessors/rl78/rl78g1x/rl78g13.html
     
    https://products.avnet.com/shop/en/ProductDisplay?storeId=715839035&catalogId=10001&langId=-1&productId=3074457345625366633
     
    OK, going down a bit, RL78/G12 has a 24MHz part that's <$1:
    https://www.renesas.com/en-us/products/microcontrollers-microprocessors/rl78/rl78g1x/rl78g12.html?status=No%3B&pin_count=20%3A20%3B#
     
    https://products.avnet.com/shop/ProductDisplay?catalogId=10001&langId=-1&storeId=715839035&productId=3074457345625120989&categoryId=&fromPage=autoSuggest
     
    IIRC the compiler is free, or at least there is a GCC port, and Renesas e2studio is a free Eclipse-based IDE.
  18. Like
    spirilis reacted to yyrkoon in RANT: Cloud of this, IoT of that . . .   
    I should point out that I have absolutely zero interest in anything apple / mac.
  19. Like
    spirilis got a reaction from Fmilburn in Why only prototyping?   
    Hasn't been tested to rigorous standards demanded by production use cases. Plus TI has to state that to avoid being sued if bad things happened that could be traced back to bugs in Energia.
     
    (Not an official explanation)
  20. Like
    spirilis reacted to chicken in [POTM] dAISy - A Simple AIS Receiver   
    What an enjoyable Sunday afternoon.

    Seriously, I love debugging!
     
  21. Like
    spirilis reacted to Fred in CCS 7.0 beta available   
    Good point. I just had a look and stumbled over the CC3220, CC3220S and CC3220SF. I found a single reference to the CC3220 on E2E which concluded with "you discuss unannounced product on public forum".
    https://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/t/548741


    There is also reference to the CC3220S(F)-LAUNCHXL on Mouser and Octopart but nothing there. I'm sure this happened with the MSP432 Launchpad too.
    http://www.mouser.co.uk/ProductDetail/Texas-Instruments/CC3220SF-LAUNCHXL
    http://www.mouser.co.uk/search/ProductDetail.aspx?R=0virtualkey0virtualkeyCC3220S-LAUNCHXL
     
  22. Like
    spirilis reacted to zeke in PCB design guide   
    I stumbled across a really cool resource from Ford Motor Company tonight.
     
    It's called EMC Online and it's located here: http://www.fordemc.com
     
    Here's a copy-paste of their introduction:
     
    ======================
    Forward
    The quality and reliability of today's automobiles are dependent in part on its electrical system to operate as designed within the vehicle
  23. Like
    spirilis reacted to Rei Vilo in Energia can example   
    See chapter 6 of the http://www.ti.com/lit/ug/spmu298d/spmu298d.pdf'>TivaWareTM Peripheral Driver Library USER
  24. Like
    spirilis reacted to EdoNork in CCS 7 is out   
    http://processors.wiki.ti.com/index.php/Download_CCS#Code_Composer_Studio_v7.0_Downloads
  25. Like
    spirilis got a reaction from Fmilburn in MSP430 Wearable with Radio   
    Regarding making your own PCB with RF, one nice thing about the TI parts is the TI reference designs, I've used their 2-layer (0.8mm thick) ref design to build a few CC1310 boards of my own, and they work great but the RF passives are all 0402 and require a stencil for solder (OSHStencils stainless works great for this). 0402 is a bear and the absolute lower limit I will go.
     
    That said, one of TI's partners made a module for the CC2650 with LGA pads underneath IIRC. That makes the chip far more accessible. Trey German formerly from TI started a small company (Polymorphic Labs) building tiny gadgets based on that module. The CC2650 "BoosterPack" package includes a sample or 2 of that module. But of course all of that is probably over your budget
×
×
  • Create New...