Author Topic: 68HC11 vs MSP430 vs other MCUs  (Read 1284 times)

0 Members and 1 Guest are viewing this topic.

Offline plancTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 149
  • Country: us
68HC11 vs MSP430 vs other MCUs
« on: January 08, 2023, 01:25:25 am »

My MCU programming experience was with the Motorola 68HC11. Here there is a resident debugging program at the firmware called "Buffalo" that you can interact directly. I can go inside the firmware itself and display memory, modify single memory, even display the assembly code by using ASM (memory) like in the following.






In the above HC11, the Interrupt vector for RESET is also FFFE, same as the MSP430. However it is stored in ROM unlike in MSP430 which is in flash.

I have the following questions.

1. In the 68HC11. The interrupt vector address FFF0 to FFFF is in rom. But in the MSP430, it is in flash and also happens to be the password of BSL. However I have seen a working MSP430F2617 where the interrupt vectors at FFF0 to FFFF have same values of FFs which is for blank chip. Can the interrupt vectors really be reassigned? Please confirm and give basic idea how the MCU interrupt vectors addresses can be reassigned to other addresses.

2. I read you can modify single memory in EEPROM but for Flash, it is in segments in 512 bytes for the MSP430. But in CCS, you need to upload the entire program just to add even a single byte. Can't you just insert it in segment? What software in MSP430 that you can insert in segment and not upload the entire program just to modify one byte?

3. The 68HC11 where you can go inside the firmware and debug by displaying specific memory, modifying single memory and using command ASM <memory>etc. is more elegant. Why didn't they implement this in the MSP430 too?

4. Lastly, What other MCUs that can do similar to the 68HC11 where you can, again, go inside the firmware and debug by displaying specific memory, modifying single memory and using command ASM <memory> etc. just like in the screenshot above?

Thank you!
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1916
  • Country: au
Re: 68HC11 vs MSP430 vs other MCUs
« Reply #1 on: January 08, 2023, 01:51:39 am »
2. I read you can modify single memory in EEPROM but for Flash, it is in segments in 512 bytes for the MSP430. But in CCS, you need to upload the entire program just to add even a single byte. Can't you just insert it in segment?
In theory, yes, any FLASH MCU could limit to only changed pages, but that is going to be slower in most cases, because you need to read a page and compare before you decide to erase and then download .
In most MCUs edits move all the code above that edit up or down.
Most download Sw does stop then the HEX info runs out.


3. The 68HC11 where you can go inside the firmware and debug by displaying specific memory, modifying single memory and using command ASM <memory>etc. is more elegant. Why didn't they implement this in the MSP430 too?
4. Lastly, What other MCUs that can do similar to the 68HC11 where you can, again, go inside the firmware and debug by displaying specific memory, modifying single memory and using command ASM <memory> etc. just like in the screenshot above?
Pretty much all modern MCUs allow you to disasm code, they just use a slightly different approach from the old monitor ROM.
These days, some bridge device is used to connect a debug link to the host PC, which run debug code, much more complex than a ASCII terminal.
Some these days use a HS-USB link, to help keep the debug side nimble.


Buy a small Eval Board for the MCU you like the look of, and have a play with their debug support.
 

Offline dobsonr741

  • Frequent Contributor
  • **
  • Posts: 701
  • Country: us
Re: 68HC11 vs MSP430 vs other MCUs
« Reply #2 on: January 08, 2023, 01:59:06 am »
Why would you choose to go down on memory lane an find a match to 68HC11? Modern architectures, Arm and SWD can do much more from the comfort of your free IDE, like VS Code. Not to mention Copilot, if we are really start comparing features.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4314
  • Country: us
Re: 68HC11 vs MSP430 vs other MCUs
« Reply #3 on: January 08, 2023, 02:46:46 am »
Quote
The 68HC11 where you can go inside the firmware and debug by displaying specific memory, modifying single memory and using command ASM <memory>etc. is more elegant. Why didn't they implement this in the MSP430 too?
MSP430 has hardware support for "Background Debug Mode" which enables it to do all of the things you are asking for (and more, at SOURCE code level) in conjunction with a PC-side program ("IDE" or "Debugger.")  Most other modern MCUs have something similar ("SWD" for ARMs, DebugWire or UPDI for AVRs, etc.)


As the capabilities of these hardware debug assists improved, and PCs and their IDEs became more common and more powerful, the interest in "self-hosted" debuggers and "monitors" died down.  But occasionally you still see things like https://forums.raspberrypi.com/viewtopic.php?t=336843


If you get something like an MSP430 "LaunchPad" from TI, the board includes the target processor plus a chip that interfaces to the hardware debug features and talks via USB to the IDE on your PC.  Which is not bad at all, for $10.





 

Online josip

  • Regular Contributor
  • *
  • Posts: 163
  • Country: hr
Re: 68HC11 vs MSP430 vs other MCUs
« Reply #4 on: January 08, 2023, 07:26:38 am »
My MCU programming experience was with the Motorola 68HC11. Here there is a resident debugging program at the firmware called "Buffalo" that you can interact directly. I can go inside the firmware itself and display memory, modify single memory, even display the assembly code by using ASM (memory) like in the following.


You can do all this in more friendly environment (GUI) IAR or CCS, with breakpoint debugging / stepping by C or assembler instructions with watching variable / memory / registers / whatever. Check attached picture (disassembly window with binary code and assembler instructions is what you are looking for), but you can find youtube videos for live demonstration.

In the above HC11, the Interrupt vector for RESET is also FFFE, same as the MSP430. However it is stored in ROM unlike in MSP430 which is in flash.

I have the following questions.

1. In the 68HC11. The interrupt vector address FFF0 to FFFF is in rom. But in the MSP430, it is in flash and also happens to be the password of BSL. However I have seen a working MSP430F2617 where the interrupt vectors at FFF0 to FFFF have same values of FFs which is for blank chip. Can the interrupt vectors really be reassigned? Please confirm and give basic idea how the MCU interrupt vectors addresses can be reassigned to other addresses.

2. I read you can modify single memory in EEPROM but for Flash, it is in segments in 512 bytes for the MSP430. But in CCS, you need to upload the entire program just to add even a single byte. Can't you just insert it in segment? What software in MSP430 that you can insert in segment and not upload the entire program just to modify one byte?

3. The 68HC11 where you can go inside the firmware and debug by displaying specific memory, modifying single memory and using command ASM <memory>etc. is more elegant. Why didn't they implement this in the MSP430 too?

4. Lastly, What other MCUs that can do similar to the 68HC11 where you can, again, go inside the firmware and debug by displaying specific memory, modifying single memory and using command ASM <memory> etc. just like in the screenshot above?

Thank you!

1. MSP430 (family) devices vector space is fixed, however on some (I know for F5xx/F6xx) it is relocatable to RAM. But I think that even in this case reset vector / program start address must be at FFFE. If your device have FFFF value at FFFE address than it is (blank device and) not executing anything. It is not moving from FFFE address. You can check this with IAR simulator without any source code and external hardware.

2. MSP430 flash controller can write just one byte, but before that this, part (block) of flash must be erased. F2xx flash block size is 64 or 128 bytes (don't remember right know). There is option in tools to rewrite just updated location, and not all. Off course, you can modify only one byte in RAM without any other changes.

3 & 4. You can do this with almost any MCU today. Stepping thru assembler code and watching whatever you want to see. Your problem is that all this is new to you, and need to spend some time to become more familiar how to use it.

If you have some specific MSP430 question, you can also ask here...
https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum
« Last Edit: January 08, 2023, 07:30:32 am by josip »
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4533
  • Country: nz
Re: 68HC11 vs MSP430 vs other MCUs
« Reply #5 on: January 08, 2023, 07:43:38 am »
2. MSP430 flash controller can write just one byte, but before that this, part (block) of flash must be erased. F2xx flash block size is 64 or 128 bytes (don't remember right know). There is option in tools to rewrite just updated location, and not all.

Note that, to be precise you can't make any change you want to just one byte. "Erasing" a flash block sets all bits to 1s. Writing to the block can only change 1s to 0s , not 0s to 1s. So you can write to any byte up to 8 times (clearing one bit each time, in arbitrary order) before you need to erase the whole block to write a value with more or different set bits than before.
 

Offline plancTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 149
  • Country: us
Re: 68HC11 vs MSP430 vs other MCUs
« Reply #6 on: January 08, 2023, 07:47:05 am »

josip, I've been trying to run CCS for days without any source code but only connected to unlocked MSP430 chip. How do you make it load the machine code and output assembly file in real time debugging mode (with no c file or others)? Please see for this specific question at:

https://www.eevblog.com/forum/microcontrollers/to-code-composer-studio-(ccs)-users/

Thanks.
 

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 4137
  • Country: gb
  • Doing electronics since the 1960s...
Re: 68HC11 vs MSP430 vs other MCUs
« Reply #7 on: January 08, 2023, 08:31:56 am »
Quote
Note that, to be precise you can't make any change you want to just one byte. "Erasing" a flash block sets all bits to 1s. Writing to the block can only change 1s to 0s , not 0s to 1s. So you can write to any byte up to 8 times (clearing one bit each time, in arbitrary order) before you need to erase the whole block to write a value with more or different set bits than before.

Exactly.

However, when writing FLASH (or EEPROM, etc) it always makes sense to do a pre-read and write [whatever blocksize you are writing] if the new data is different. The speedup is dramatic, especially during typical development when one often changes just a few bytes.

Curiously it doesn't appear that ST Cube does it; it always does the whole 1MB or whatever.

The HC11 is really ancient. I wonder what the production life is now? Some of those old chips ran for 25 years (like the H8/300 I still use, on last time buy 10 years ago and I got loads of stock) but I would expect all to be either finished or coming up to LTB soon.
 
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline plancTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 149
  • Country: us
Re: 68HC11 vs MSP430 vs other MCUs
« Reply #8 on: January 08, 2023, 10:07:43 am »

What was so great about the HC11 was there was this THRSiim11 simulator where you can load the HC11 machine code and it will produce the assembly language and run all the simulations of all registers and even serial output and let you adjust ADC input. There was nothing in the MSP430 that can do that too.. that is, just using the machine code to produce the assembly language and ran all the simulations without using the Debugger on actual chip like MSP-FET. How come?

https://download.cnet.com/THRSim11/3000-2212_4-10017030.html
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf