Can't get EBI NCS2 to go low on NGW100

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all,

I have added an external SRAM-equivalent ADC in place of the removed SDRAM on an NGW100 on CS2. I am trying to read data from 0x08000000 but am not getting a low signal on pin T10 on the bottom of the board when I probe it with a scope and try to (unsuccessfully) read data from the ADC.

Here is how I am trying to do it:

volatile int *adcData = (volatile int*)AVR32_EBI_CS2_ADDRESS;
...
usart_write_char(MAIN_USART, *adcData);

In another file where I initialize:

#include "smc_adc.h"
#include 

void adc_setup() {
	volatile avr32_smc_t *smc = &AVR32_SMC;
	volatile avr32_smc_cs_t *cs = &(smc->cs[2]);

	avr32_smc_setup_t setupConfig;
	setupConfig.ncs_rd_setup = 0;
	setupConfig.nrd_setup = 0;
	setupConfig.ncs_wr_setup = 0;
	setupConfig.nwe_setup = 0;

	cs->SETUP = setupConfig;

	avr32_smc_pulse_t pulseConfig;
	pulseConfig.ncs_rd_pulse = 1;
	pulseConfig.nrd_pulse = 1;
	pulseConfig.ncs_wr_pulse = 1;
	pulseConfig.nwe_pulse = 1;

	cs->PULSE = pulseConfig;

	// Cycle = setup + pulse + hold
	avr32_smc_cycle_t cycleConfig;
	cycleConfig.nrd_cycle = 1;
	cycleConfig.nwe_cycle = 1;

	cs->CYCLE = cycleConfig;

	avr32_smc_mode_t modeConfig;
	modeConfig.ps = 1;
	modeConfig.pmen = 0;
	modeConfig.tdf_mode = 0;
	modeConfig.tdf_cycles = 1;
	modeConfig.dbw = 0;
	modeConfig.bat = 0;
	modeConfig.exnw_mode = 0;
	modeConfig.write_mode = 0;
	modeConfig.read_mode = 0;

	cs->MODE = modeConfig;

	// setup, pulse, cycle, mode
}

I am sure that it is something minor that I am overlooking. Does anyone have an idea?

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You have connected the ADC chip select to PORT E pin 25? And made sure the GPIO is configured correctly? I.e. leave it as PIO disabled and in peripheral A mode?

SMC setup is not so vital if you can not get the chip select line to toggle.

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, correct. I have it connected to PE25 (pin T10) and did not do anything to the PIO controller. I am able to get change the character on my screen if I throw highs and lows to the corresponding pins on the AVR but just can't get CS2 to go low.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I found the test pad corresponding to PX41. It is the corner pad next to the MCU in the square array and is closest to the USB connector. I read from the address corresponding to NCS3 and got a reading on the scope with no problem. Maybe I am yet again another victim of RoHS BGA balls...

Does anyone know which actual test pad corresponds to PE25? It isn't documented in the NGW100 schematics as far as I can tell.

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

try cranking up the pulse width; the init code you posted will only give a pulse one clock cycle wide.

Letting the smoke out since 1978

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried that as well. I tried a lot of changes to the timings and ended up getting nowhere with it. When I flipped over to CS3, I had no problems with any settings whatsoever, leaving the registers at their initial values or giving them the very fast/stringent ones that I posted here. It is all a bit odd, but it doesn't matter at this point as I just needed a proof of concept before I design a mixed signal board and spend the better part of a grand on a 6-layer run.

Your help is always appreciated.