This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MCBSTR9 - another noob... (beginner problems with GPIO)

Dear Colleagues,

A bought an MCBSTR9 DSK + Ulink2 programmer. I never had so much trouble with lack of a good quickstart documentation than with this setup.

My problem:
I wrote simple program that should just switch on every 2nd pin on GPIO7 and run in an endless loop (just in case), but it actually doesn't do anything (even the port direction, data, etc registers don't respond - the debugger shows they're all reset all the time).
For what I can see, it does compile and load correctly

In the configuration file (STR91x.s) I left all by default, except that I switched on the Port Clock Gating for GPIO7

Can someone please tell me what am I missing here?

Here's my simple program:

#include <91x_lib.h>

int main (void)
{

GPIO_InitTypeDef GPIO_InitStruct;

GPIO_DeInit(GPIO7);

GPIO_InitStruct.GPIO_Direction = GPIO_PinOutput;

GPIO_InitStruct.GPIO_Pin = GPIO_Pin_All;

GPIO_InitStruct.GPIO_Type = GPIO_Type_PushPull ;

GPIO_Init (GPIO7, &GPIO_InitStruct);

GPIO_Write(GPIO7, 0xAA);

while(1);
}

Best Regards,
Istvan

Parents
  • Right. I got used to answer my own questions.
    I missed to include the 91x_it.c interrupt handler file. The program seems to be running now but nothing seems to be happening. I tried to measure the voltages on the board - nothing, and also when I open Peripherals -> GPIO7 it's naturally also all reset.
    Infacet, when I open the Power System and Clock Control window, it also shows no changes, regardless that I have made changes to the Configuration Wizard (tried to turn the PLL on/off etc, but it doesn't reglect to the device)...

    Any help about this? What I can say is, that I to connect to the board and I'm not in simulation mode - I'm definitely debugging live.

Reply
  • Right. I got used to answer my own questions.
    I missed to include the 91x_it.c interrupt handler file. The program seems to be running now but nothing seems to be happening. I tried to measure the voltages on the board - nothing, and also when I open Peripherals -> GPIO7 it's naturally also all reset.
    Infacet, when I open the Power System and Clock Control window, it also shows no changes, regardless that I have made changes to the Configuration Wizard (tried to turn the PLL on/off etc, but it doesn't reglect to the device)...

    Any help about this? What I can say is, that I to connect to the board and I'm not in simulation mode - I'm definitely debugging live.

Children
No data