Welcome to Brooklyn Board by Silica Architech ‘s documentation!

Version:1.0.0
Copyright:(C)2016 Avnet Silica company
_images/freescale.jpg _images/maxim.jpg
Silica Brooklyn Board is useful system to evaluate MAXIM Pmod device and is designed for use with Freescale TWR-K70F120M tower system
This software release is working on Kinetis K70 devices but not under MQX rtos

A further revision working with MQX rtos will be relased soon.

You can find and download TWR-K70 documentation by clicking:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=TWR-K70F120M&tid=m32TWR

Developement software used is CodeWarrior MCU v10.3 Special Edition.

This application is free downlodable from Freescale site. Go to:

and select “offline” package. (note that download can take much time ...)

We suggest you to read the Quick Start Guide to setup your evaluation system

Quick start guide

This guide explains how to use this application and provides an overview of on the structure of the project firmware

Installing Codewarrior on WIN7 or WIN8

Double click on ‘CW_MCU_v10.3_b121211_SE_Offline.exe’ that you have downloded first, and follow installation istruction.

_images/cw_exe.jpg

Quick start guide for Codewarrior install can be found at http://cache.freescale.com/files/soft_dev_tools/doc/quick_ref_guide/MCU_QS.pdf?fpsp=1

When setup ask for MCU type, select almost Kinetis as show below, then press NEXT button

_images/cw_kinetis.jpg

If you have Windows7 or Windows8 (32 or 64 bit) Codewarrior will install into “Freescale\CW MCU v10.3” folder on the root of your system HDD.

_images/cw_dir.jpg

and create a default work folder named workspace in the path C:\Users\ your_user_name \workspace

_images/cw_work.jpg
make sure that setup have been installed Jungo Driver. See your system configuration (righ-click on Computer –> Properties –> Device Manager)
if you have any troubles about, read Codewarrior install Guide
_images/jungo.jpg

Codewarrior on WINXP

For WinXP, after installation, you have:

  • installation folder
_images/xp_cw_dir.jpg
  • default work folder
_images/xp_cw_work.jpg
  • Jungo driver:
_images/xp_jungo.jpg

Firmware details

Brookling Board firmware comes from original Maxim Maxim Zenboard Platform project revision 1.6, by using the file listed above.

Main project files from Maxim

  • MaximPmod.c
  • menu.c.
  • maximDeviceSpecificUtilities.c
  • platform.c
  • utilities.c

and related include files

  • MaximPmod.h
  • menu.h
  • maximDeviceSpecificUtilities.h
  • platform.h
  • utilities.h
  • platform_config.h

You can find all this file in the “Source” folder of the project

General include files

  • xbasic_types.h
  • xgpio.h
  • xgpio_l.h
  • xiic_l.h
  • xil_assert.h
  • xil_cache.h
  • xil_io.h
  • xil_types.h
  • xparameters.h
  • xparameters_ps.h
  • xpseudo_asm.h
  • xpseudo_asm_gcc.h
  • xreg_cortex9.h
  • xspi.h
  • xspi_i.h
  • xspi_l.h
  • xstatus.h
  • xuartlite.h
  • xuartlite_i.h
  • xuartlite_l.h
  • xuartps_hw.h

You can find all this file in the “Source\x_files” folder of the project

_images/x_files.jpg

Main Project files added

In source folder you find application specific files:

  • ProcessorEspert.c (containing Main())
  • Events.c
  • driver.c (low-level function replacement)

and include files

  • MaxFuncRedefinition.h (start menu function redifinition)
  • Events.h
This project is developed under Codewarrior 10.3 using Processor Expert tools. You can also find two folders, one named “Generated_Code” and second named “PE_code”
The first one contain auto-generated file that depend on Logical Device component inside Processor Expert Components, and may rebuild each occurence (when a device settings modification has been made)
The second contains file one-time generated by Processor Expert and “freezed” in this folder. No modification can be invoked by Processor Expert.
_images/CW_prj.jpg

Detailed documentation of firmware can be downloaded ..... link

Firmware changes

1 - added include file MaxFuncRedefinition.h at the top of MaximPmod.c file.
This file must be the first to be included in the list.
#include "MaxFuncRedifinition.h"  <----

#include <stdio.h>
#include "platform.h"
#include "menu.h"
#include "utilities.h"
#include "maximDeviceSpecificUtilities.h"
#include "maximPMOD.h"

#define MAJOR_REVISION 1
#define MINOR_REVISION 6

2 - renamed main() function inside MaximPmod.c file with new name main_pmod().

int main_pmod()      <----
/**
* \brief       Main() function for Analog Essentials example program.
* \par         Details
*              This function allows you to set and initializes the FPGA and hardware, which will appear in the main menu by
               HyperTerminal, which will send the demo of individual programs to the basic module.
*
* \param       None
*
* \retval      Always TRUE
*/
{
       // Variables for the main() function
       u8 uchInput=0;
       int nMenuState=0;
       int i=0;
       char tempString[256];

3 - commented function led_knight_rider inside MaximPmod.c file to obtain application fast start.

// Toggle the LEDs so that the user knows the board is awake
       XGpio_Initialize(&g_xGpioLed, XPAR_AXI_GPIO_LED_DEVICE_ID);
       XGpio_SetDataDirection(&g_xGpioLed, 1, 0x00000000); // Set the LED peripheral to outputs
//     led_knight_rider(&g_xGpioLed,2);     <----

4 - changed costant definition ABOUT_ONE_SECOND inside MaximPmod.h file as follow:

#define ABOUT_ONE_SECOND 74067512/8/3   <----
//#define ABOUT_ONE_SECOND 74067512      //!< approx 1 second delay when used as argument with function delay(numberCyclesToDelay)
// Update this if uBlaze/Zynq CPU core frequency is changed, or if the external memory timing changes.
// Although emprirically tested to 1.0000003 seconds, it is not meant to be used for precise timing purposes

NOTE: All these changes are tested on revision 1.6 of Maxim project files and need to be checked on further new revisions

More about Pmod

Maxim Analog Essential Collection is a collection of plug-in peripheral modules (Pmod) You can find more informations visiting Maxim Analog Essential Collection site

_images/plug-in-modules.jpg

Important notice

At the date of issue of this review, Maxim Zenboard Platform Project files are available on version 1.6, and don’t support MAX14850 Pmod module. As a result this version, that use original files from Maxim project, is not able to emulate this device.

_images/max14850.jpg

Emulation of MAX3232

This device is a RS232 converter, and require 2 serial channel (each one connected to terminal software) for full test. The first one is used for commands and the second one must be connected, for complete testing purpose, to MAX3232 Pmod serial connector (by standard modem cable).

_images/max3232.jpg

Quick start guide

Hardware requirements

  • Tower system for Kinetis K70F120M (with TWR-SER expansion)
  • Mini USB type-B cable
  • Silica BrooklynBoard
  • PC with at least one RS232 serial port and terminal software (two serial port for MAX3232 emulation)
  • RS232 DB9 serial cable (modem type)
  • Maxim Analog Essential Collection
_images/SILICA_Brooklyn_Board.jpg

Software requirements

  • CodeWarrior MCU v10.3 Special Edition (download here).
  • Brooklyn Board application firmware for TWR-K70F120M system (download here ....)

Hardware setup

  • Assemble tower system TWR-K70F120M and Brooklin Board as in figure below.
_images/assemble.jpg
Don’t care slot position, but be careful to connect Primary and Secondary connector properly.
Take care at reference signed near PCI board connectors.
_images/pmod_pry.jpg
  • Plug a Pmod Device (i.e. DS3231M Real Time Clock) inside properly connector.
_images/pmod_in.jpg

–> Be careful to see device reference next to connector. Each connector is designed for one or more devices and will only accept dedicated modules.

  • Plug Mini USB type-B cable into Cpu Board plug and connect to PC with Codewarrior. TWR power led will on
_images/twr_on.jpg
  • If you see device tab, you will find OSBDM/OSJTAG debug port
_images/twr_conn.jpg
  • plug the standard serial DB9 cable into serial connector on Tower System
  • connect serial cable to terminal PC (equipped with terminal SW)
_images/serial.jpg
  • On your terminal PC setup COMx parameter:
speed = 115200 baud
data with = 8
parity = none
stop bit = 1
flow control = none
_images/com_set.jpg

Now you are ready for install FW project.

Brooklyn Board FW setup

  • Extract from Pmod1_6.zip the folder Pmod1_6 and place it into Codewarrior default workspace
_images/pmod1_work.jpg
  • start Codewarrior. Select “workspace” as in default window and click OK.
_images/pmod2_work.jpg

Now we could see the welcome window of Codewarrior Developement Suite

_images/pmod3_welcome.jpg

maybe will open firewall popup as below

_images/pmod_fire.jpg

if yes, left-clik on enable access and proceed

  • close the welcome window by clicking ‘X‘ in the Welcome tab
_images/pmod_close_welcome.jpg

Now we can see the Codewarrior main window

_images/pmod_main.jpg

Codewarrior is ready to import the project

Pmod FIRMWARE IMPORT

  • Select File –> Import and click
_images/pmod_import.jpg
  • in the next tab select “Existing Project into Workspace” and click “NEXT”
_images/pmod_space.jpg
  • in the next window make the following step
1 - click on Brouse button.
2 - select folder “Pmod1_6” as below.
3 - click on OK button.
_images/pmod_folder.jpg
  • select checkbox “Pmod1_6(C:\User\ my_foder_name \workspace\Pmod1_6) and “Copy projects into workspace”
  • click “Finish”
_images/pmod_setprj.jpg

How to build Brooklyn Board FW

  • see Codewarrior Project tab an selec the project “Pmod1_6”, right-clik over, select “Clean Project” an clik
_images/pmod_clean.jpg

when process finish, see at hammer icon and click right arrow: in the tab you can see “1 FLASH” checked

_images/pmod_bcheck.jpg

now click single-hammer icon to build entire project

_images/pmod_build.jpg

See the “problems” tab. There are 2 warnings derived from original project. They have no functionallity effects.

_images/pmod_problem.jpg

see the bug icon and click right arrow, select “Debug configurations” and click

_images/pmod_setdb.jpg

Debug Configurations tab will open

_images/pmod_setdb1.jpg

expand Codewarrior Download, select “Pmod1_FLASH_PnE U-Multilink” an click. Now we see

_images/pmod_setdb2.jpg

click on “Debug” button and wait

maybe will open firewall popup as below

_images/pmod_fire1.jpg

if yes, left-clik on enable access and proceed

during firmware download this tab will open

_images/pmod_prog.jpg

and when download finish you see the main debug windows of Codewarrior

_images/pmod_debug.jpg

to start program you can press “F8” or click on Icon red-circled in image above

NOTE: for full Codewarrior functionallity please refer to Freescale Official Guide

download here Codewarrior Guide

Running Brooklyn Board FW

When you start program, in terminal window you can see for few seconds this screen

_images/first.jpg

and after you can see the main menu

_images/second.jpg
Now select device menu (typing selection key in the terminal window) and follow menu option to test device.
It is strongly recommended to change or insert Pmod Modules when Tower System is off (without power).
Then, turn off the power by disconnecting the Mini USB B-type cable, remove device (if present) and insert new module in properly connector.
Turn on the power by plug the Mini USB B-type cable. The program will restart. Follow same steps used before to test new device

We also suggest you to see documentation Maxim Pmod-Compatible Plug-In Peripheral Modules for any specific further detail.