{"id":1477,"date":"2023-09-26T18:41:06","date_gmt":"2023-09-26T17:41:06","guid":{"rendered":"https:\/\/ibex.tech\/embedded\/?p=1477"},"modified":"2023-09-26T21:32:57","modified_gmt":"2023-09-26T20:32:57","slug":"pmp-usage-general","status":"publish","type":"post","link":"https:\/\/ibex.tech\/embedded\/microchip\/pic32\/xc32\/pmp-parallel-master-port\/pmp-usage-general","title":{"rendered":".PMP usage General"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">PMP stands for &#8220;Parallel Master Port&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">PIC32&#8217;s that support iPMP generally provide the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An 8 or 16 bit parallel port (pins: PMD15:PMD8 and PMD7:PMD0)<\/li>\n\n\n\n<li>Up to two CS pins that are triggered using address bits 15 and 14 (i.e. set the address with those bits set to cause the associated CS pins to be triggered). Optional: you can have none, CS2, or CS2 and CS1 used and you can set the state as active low or active high.<\/li>\n\n\n\n<li>Optional read pin PMRD<\/li>\n\n\n\n<li>Optional write pin PMWR (you will typically want to use one or both of these!)<\/li>\n\n\n\n<li>Select from two master modes: Master mode 1 = read and write strobe are combined into a single control line, PMRD\/PMWR and a second control line, PMENB, determines when a read or write action is to be taken. In Master mode 2, read and write strobes (PMRD and PMWR) are supplied on separate pins.<\/li>\n\n\n\n<li>Operation is relatively straightforward &#8211; you can poll or configure an IRQ to load the next word\/byte to be read or written, or use the DMA to do it for you with a block of data.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">An example config:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\t\/\/----- SETUP PMP (Parallel Master Port) -----\n\t\/\/Config done in MCC:\n\t\/\/\tStop in Idle Mode bit: OFF\n\t\/\/\tPMP Mode Selection: Master mode 2 (mode 2 = read and write strobes (PMRD and PMWR) are supplied on separate pins)\n\t\/\/\tMaster Mode Configuration:\n\t\/\/\t\tEnable Interrupts: NO\n\t\/\/\t\tChip Select Function Bits: PMCS1 and PMCS2 functions as Chip Selec\n\t\/\/\t\tChip Select 1 Polarity bit: Active-low\n\t\/\/\t\tChip Select 2 Polarity bit: Active-low\n\t\/\/\t\tData Setup Wait States: Data wait of 4 Tpbclk2\n\t\/\/\t\tStrobe Wait States: Wait of 2 Tpbclk2\n\t\/\/\t\tData Hold Wait States: (for writes) Wait of 4 Tpbclk2 \/ (for reads) Wait of 3 Tpbclk2\n\t\/\/\t\tTransfer Size: 8-bit mode\n\t\/\/\t\tAddress Increment Mode: No increment of decrement\n\t\/\/\t\tRead Strobe Enable: NO\n\t\/\/\t\tWrite Strobe Enable: YES\n\t\/\/\t\tWrite Stobe Polarity bit: Write strobe active low \/ Enable strobe active low\n\t\/\/\t\tAddess Port Enabe: NO<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>PMP stands for &#8220;Parallel Master Port&#8221;. PIC32&#8217;s that support iPMP generally provide the following: An example config:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118],"tags":[],"class_list":["post-1477","post","type-post","status-publish","format-standard","hentry","category-pmp-parallel-master-port"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/1477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/comments?post=1477"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/1477\/revisions"}],"predecessor-version":[{"id":1481,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/posts\/1477\/revisions\/1481"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/media?parent=1477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/categories?post=1477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/embedded\/wp-json\/wp\/v2\/tags?post=1477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}