Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pinguino32MX220 cant enter bootload mode
28-05-2013, 07:16 PM, (This post was last modified: 28-05-2013, 07:20 PM by Mary Perzu.)
Pinguino32MX220 cant enter bootload mode
Hi every one,

Im new using Pinguino. I was experimenting with the SPI of the PIC32MX220, just variying the FSCK.THis is the sample code that i used (I found it in the Serial Peripheral Interface reference manual of the PIC32 Family)

void setup() {
    //run once:
    unsigned char rData;

    IEC0CLR=0x03800000; // disable all interrupts
SPI1CON = 0; // Stops and resets the SPI1.
SPI1CON2 = 0; // Reset audio settings
rData=SPI1BUF; // clears the receive buffer
IFS0CLR=0x03800000; // clear any existing event
IPC5CLR=0x1f000000; // clear the priority
IPC5SET=0x0d000000; // Set IPL=3, Subpriority 1
IEC0SET=0x03800000; // Enable RX, TX and Error interrupts
SPI1STATCLR=0x40; // clear the Overflow
SPI1CON2=0x00000082; // Right-Justified Mode, AUDEN =1, AUDMON=0
SPI1BRG =0x11; // (to generate 256 kbps sample rate, PBCLK @ 40 MHz)
SPI1CON =0x20008020; // Master mode, SPI ON, CKP = 0, FRMPOL = 1, MSTN = 1
// 16-bit audio data, 32 bits per frame
// DISSDO = 0, transmit unused bit slots with logic level 0
// DISSDI = 0, receiver to ignore the unused bit slots
// from here, the device is ready to receive and transmit data
/* Note: A few of bits related to frame settings are not required to be set in the SPI1CON */
/* register during audio mode operation. Please refer to the notes in the SPIxCON2 register.*/


void loop() {
    //run repeatedly:


Everything worked fine till I added a new line to change the PBCLK:

After this I couldnt detect with the oscilloscope any clock pulse any more and now the board cannmt even enter into bootload mode anymore. Sad

Did I just made my Pinguino kaputt?Huh Do have some idea why it can enter to bootloader mode? The leds are off all the time when it is connected to the USB in computer. I tried pressing RESET many time connecting and disconnecting. What else could I try?

All ideas are appreciated!

Forum Jump:

Users browsing this thread: 1 Guest(s)