Low level JTAG Interface programming - jtag

What I have is direct access to the four JTAG Interface pins on an Atmel CPU.
What I need is low-level C code to wiggle those pins and implement two functions:
ReadMemoryWord(address)
WriteMemoryWord(address, word)
Anyone done this before? Or can point me in the right direction?
I already have one answer: Read the IEEE spec. I'm hoping there's a shorter path.

You could look through OpenOCD. I'm not sure if it's a shorter path :)

Related

Porting a project that is written for STM32 (ARM-Cortex M7 to NXP (ARM-Cortex M7)

The STM32 supply is very bad at the moment hence I am considering moving away from the STM32 and going for NXP since the supply is much better.
I would like to ask for advice regarding migrating from STM32 to NXP:
Have anyone tried to migrate their project from STM32 to NXP? Can this be done easily if the Core is the same?
What are the major difficulties that I may encounter?
Can I easily just remap pins, copy paste SPI/I2C and other drivers and they will just simply "work"
I have not gone through the migration, but consider that every single peripheral device (timers, Flash, SPI, I2C, etc) between two different micro manufacturers has a completely different register interface. This means that not a single thing works until you've implemented the new register interface. Usually this is handled by the manufacturers HAL, but those also have completely different C interfaces - so you're going to have to implement that, at the very least. So it's going to be a massive change no matter what. People who predict moving their code from one manufacturer to another usually build a porting layer in advance that hides the HAL, and swap out the HALs behind this layer. It mostly moves the development effort to another place (upfront) and starts reducing the work if there are more than 2 ports to maintain.
To get started it's best to have a quick look at the NXP HAL documentation on the peripherals you're using.

How to implement CAN Bus on STM32F042k6 without Std Lib and CubeMX

I am trying since a couple of days to implement a CAN Bus communication for my above mentioned board without success. I wish to do this using the Registers only. Can someone give some hints on how I should proceed? or a link?. Thanks in advance.
Why don't you use the Std Lib as a starting point?
The library includes all functions and registers you need. You must simply go through one of the examples and "copy" the direct register accesses to your project.
(And perhaps you also want to use some of their defines for the bit definitions)

Programming SAM uC family without ATmel Studio

I've asked this question on :https://electronics.stackexchange.com/
with no success, So I'm trying my luck here.
I've designed a board that used a SAM uC (Cortex M0+). I don't want to use the ATmel Stduio, I want to learn how to use eclipse and arm-gcc and OpenOCD ( still can't understand, what this one is for ?). So my question is it possible to do that and if yes, does anyone has hint how can I proceed ?
I've installed the 3 parts,and this is the farthest I could get:
I agree with Notlikethat, what is it that you cant figure out.
1) Yes, I have dozens or hundreds of bare metal microcontroller examples that use the gnu toolchain, no ides, just the command line. No problems there whatsoever.
2) OpenOCD is an open source tool that knows how to speak to the on chip debuggers, in particular ARM ones. And it supports JTAG and SWD which is what your cortex-m0+ will have if exposed (which it most likely is).
3) which SAM microcontroller there are hundreds of different ones over a decade or so, the cortex-m0+ certainly narrows that down from what is actually more like thousands to more like hundreds of different ones. Narrow it down to at least one family. Is it the popular SAMD21? I have personally used one of those, and using openocd and gcc is quite doable without any need for an IDE from anyone. Just add a text editor.
I prefer to use a $10 st discovery or nucleo board as my SWD debugger, remove a couple of the jumpers and you can use that st-link front end for other microcontrollers st or not st.
The chip documentation as well as google will show you how to hook all this up and talk to the chip.
Do you have just a raw chip or do you have it on a board, one you made or one you bought?
Your question is the equivalent of, I have a Ford, and I dont know what size brake pads I need and do I have to have the dealer install them.
Is it a truck is it a car, which one, how many models/variations have they had in the last hundred or so years? Look up the sizes/parts in a manual. And the latter is yes of course you can do it yourself, or have someone else install them, you dont have to go to the dealer.

Simple examples/applications of Bayesian Networks

Thanks for reading.
I want to implement a Baysian Network using the Matlab's BNT toolbox.The thing is, I can't find "easy" examples, since it's the first time I have to deal with BN.
Can you propose some possible applications, (with not many nodes) please ^^ ?
Have a look at Tom Mitchell's "Machine Learning" book, which covers the subject starting with small, simple examples. I suspect there are many course slides you could access online which also give simple examples.
I think it helps to start with higher level tools to get a feel for how to construct networks before constructing them in code. Having a UI also allows you to play with the network and get a feel for the way the networks behave (propagation, explaining away, etc).
For example have a look at the free Genie (http://genie.sis.pitt.edu) and its samples, and/or the 50 node limited Hugin-Lite (http://www.hugin.com/productsservices/demo/hugin-lite) with it's sample networks. You can then check your BNT implementations to make sure they verify against the software packages.
Edit: I forgot to mention Netica which is another BN/Influence diagram software package which I think has the biggest selection of examples http://www.norsys.com/netlibrary/index.htm.

Non-HID Mouse driver on NT

I'm looking to write a custom touchpad driver for my laptop, as its support under Windows is abysmal. I have the protocol figured out and I'm ready to go ahead and implement it, but I'm a bit confused as to how to go about it. It's a multitouch touchpad, so I'd like to support the Windows Touch interfaces in addition to standard mouse support, but the examples in the WDK (Elotouch being the most relevant one) only show HID support. In my Googling around, I discovered someone mentioning that the proper way to handle this is to write a shim driver that will expose HID from the low-level protocol, but I couldn't find good information on where to start with that.
What examples (WDK or otherwise) should I take a look at and is the HID shim the right way to go about this? I'm looking to target Vista+ at the least, XP would be nice as well.
Thanks
Edit: A bit of clarification. The touchpad is USB but non-HID. Also, if the HID shim is the best way to go, can I use KMDF there, or do I have to go WDM? Most of my experience is WDM, but I'm not sure which way to go.
There is a msdn article about how you can map a non-HID device to a HID device as part of the Windows Touch Overview.
Also don't miss the general driver developing tips.