1=================
So I was having a problem with my KSDK 1.2 based projects that used DMA, using KDS 3.0 where no matter what I was doing, they were dropping into the default IRQ.
When I started to dig I found that the DMA IRQ's were undeclared, and greyed out as not defined inside of the edma_irq file, because of a value called FSL_FEATURE_SOC_DMA_COUNT contained in the MK2251212_features.h file.
FSL_FEATURE_SOC_DMA_COUNT (0) ----> When I change this value to 16 (can't remember off hand but I think that's the number of DMA channels?), I get my DMA IRQ handler, and everything runs as it is supposed to. Not sure if this is the correct way to solve this, but would appreciate some input.
2 ====================
I'm working on a USB application from scratch (by copying the function and logic from an example....) which I can't solve a problem for after a while of trying, because I can't find where anything is actually declared half of the time in this API. I'm calling :
USB_Class_MSC_Init(USB_CONTROLLER_KHCI_0, &g_msd_config, &msd_handle);
Which gets me to ... usb_status usb_device_init ....
/* Initialize the USB controller chip */
if (dev_if->dev_init != NULL)
{
PROBLEM -----> error = dev_if->dev_init(controller_id,usb_dev_ptr->controller_handle);
}
else
{
......
And never beyond this function from a structure of pointers to functions. Drops into default IRQ.
In features we have, the correct number of USB devices.
In startup_MK22F51212.S i see def_irq_handler USB0_IRQHandler
And in MK22F51212.h I see
/** Interrupt vectors for the USB peripheral type */
#define USB_IRQS { USB0_IRQn } where USB0_IRQn = 53,
Where is does USB0 Irq actually live as a function and how do I get it into the vector table or whatever it is I need to do in order to get this initialization process to complete? It obviously doesn't use the interrupt handler /callback I've written into my code, or replace the address - so what do I need to do? Prior to the above mentioned function, NVIC 53 has a priority set, the interrupt set enable bit is set, and that the interrupt clear-enable bit is also set.I noticed that in my structures the Callback is assigned, but it says the address is "0x835" while the actual function appears to start at "0x834" - is this something I should also be concerned about? I've tried mass erase and getting rid of breakpoints completely to try to rectify but it's still not working.
3 ====================
What is the major difference between the SDK and BM adapter for the USB stack? Is there a specific reason that an example BM project has SDK selected in the adapter_config.h - is this correct? Because some of the example I've looked at are setup like this.
Thank you.